Skip to content
This repository was archived by the owner on Jul 24, 2024. It is now read-only.

Commit e8b28ce

Browse files
[PARO-779] Prep for v2.2.0 release (#64)
* MAINT CircleCI: drop py3.4, add py3.8, specify only py3.x minor versions * MAINT drop versioneer; update setup.py * DEP minimal versions in setup.py, exact ones in dev-req txt * MAINT update MANIFEST.in * MAINT update readme * MAINT add twine check in CircleCI for PyPI compliance * MAINT update changelog * MAINT more setup.py updates * MAINT add repo badges to readme * FIX typo in readme * MAINT make sure setuptools is available for pkg_resources * MAINT setup.py needs to import setuptools for numpy internal * MAINT drop python 3.5
1 parent 60d6d8f commit e8b28ce

11 files changed

+77
-2307
lines changed

.circleci/config.yml

+17-14
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,42 @@
11
version: 2
2+
23
workflows:
34
version: 2
45
test:
56
jobs:
67
- test-3.6
78
- test-3.7
8-
- test-3.5
9-
- test-3.4
9+
- test-3.8
10+
1011
jobs:
11-
test-3.6: &unit-tests
12+
test-3.8: &unit-tests
1213
working_directory: ~/python-glmnet
1314
docker:
14-
- image: circleci/python:3.6.6
15+
- image: circleci/python:3.8
1516
steps:
1617
- checkout
1718
- restore_cache:
18-
key: deps1-{{ .Environment.CIRCLE_JOB }}-{{ checksum "requirements.txt" }}-{{ checksum "dev-requirements.txt" }}
19+
key: deps1-{{ .Environment.CIRCLE_JOB }}-{{ checksum "dev-requirements.txt" }}
1920
- run:
2021
name: Install environment
2122
command: |
2223
python3 -m venv venv
2324
. venv/bin/activate
24-
pip install -r requirements.txt
2525
pip install -r dev-requirements.txt
2626
- save_cache:
27-
key: deps1-{{ .Environment.CIRCLE_JOB }}-{{ checksum "requirements.txt" }}-{{ checksum "dev-requirements.txt" }}
27+
key: deps1-{{ .Environment.CIRCLE_JOB }}-{{ checksum "dev-requirements.txt" }}
2828
paths:
2929
- "venv"
3030
- run:
3131
name: Install Fortran compiler
3232
command: sudo apt-get install -y gfortran
33+
- run:
34+
name: Build package under test and check for PyPI compliance via twine
35+
command: |
36+
. venv/bin/activate
37+
pip install twine
38+
python setup.py sdist
39+
twine check dist/`ls dist/ | grep .tar.gz`
3340
- run:
3441
name: Install package under test
3542
command: |
@@ -41,15 +48,11 @@ jobs:
4148
. venv/bin/activate
4249
cd ~
4350
pytest -v python-glmnet/glmnet
44-
test-3.4:
45-
<<: *unit-tests
46-
docker:
47-
- image: circleci/python:3.4.9
48-
test-3.5:
51+
test-3.6:
4952
<<: *unit-tests
5053
docker:
51-
- image: circleci/python:3.5.6
54+
- image: circleci/python:3.6
5255
test-3.7:
5356
<<: *unit-tests
5457
docker:
55-
- image: circleci/python:3.7.0
58+
- image: circleci/python:3.7

CHANGELOG.md

+4
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,17 @@ This project adheres to [Semantic Versioning](http://semver.org/).
44

55
## Unreleased
66

7+
## 2.2.0 - 2020-06-29
78
### Changed
89
* [#57](https://github.com/civisanalytics/python-glmnet/pull/57)
910
Mark the Fortran code as linguist-vendored so that GitHub classifies
1011
this project as Python (#37).
1112
* [#62](https://github.com/civisanalytics/python-glmnet/pull/62)
1213
Update the cross-validation for users to be able to define groups of
1314
observations, which is equivalent with *foldid* of *cvglmnet* in *R*.
15+
* [#64](https://github.com/civisanalytics/python-glmnet/pull/64)
16+
- Python version support: Add v3.8, and drop v3.4 + v3.5.
17+
- Maintenance: Drop versioneer; update and pin dependencies for development.
1418

1519
## 2.1.1 - 2019-03-11
1620
### Fixed

MANIFEST.in

-3
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
1-
include requirements.txt
21
include README.rst
32
include LICENSE
43
recursive-include LICENSES *
5-
include versioneer.py
6-
include glmnet/_version.py
74
include glmnet/*.pyf
85
exclude glmnet/*.c

README.rst

+22-4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,24 @@
11
Python GLMNET
22
=============
33

4+
|CircleCI| |Conda| |PyPI| |PyVersions|
5+
6+
.. |CircleCI| image:: https://circleci.com/gh/civisanalytics/python-glmnet.svg?style=svg
7+
:target: https://circleci.com/gh/civisanalytics/python-glmnet
8+
:alt: Build status
9+
10+
.. |Conda| image:: https://anaconda.org/conda-forge/glmnet/badges/version.svg
11+
:target: https://anaconda.org/conda-forge/glmnet
12+
:alt: Latest version on conda forge
13+
14+
.. |PyPI| image:: https://img.shields.io/pypi/v/glmnet.svg
15+
:target: https://pypi.org/project/glmnet/
16+
:alt: Latest version on PyPI
17+
18+
.. |PyVersions| image:: https://img.shields.io/pypi/pyversions/glmnet.svg
19+
:target: https://pypi.org/project/glmnet/
20+
:alt: Supported python versions for python-glmnet
21+
422
This is a Python wrapper for the fortran library used in the R package
523
`glmnet <http://web.stanford.edu/~hastie/glmnet/glmnet_alpha.html>`__.
624
While the library includes linear, logistic, Cox, Poisson, and
@@ -17,7 +35,7 @@ Installation
1735
requirements
1836
~~~~~~~~~~~~
1937

20-
``python-glmnet`` requires Python version >= 3.4, ``scikit-learn``, ``numpy``,
38+
``python-glmnet`` requires Python version >= 3.6, ``scikit-learn``, ``numpy``,
2139
and ``scipy``. Installation from source or via ``pip`` requires a Fortran compiler.
2240

2341
conda
@@ -39,9 +57,9 @@ pip
3957
source
4058
~~~~~~
4159

42-
``glmnet`` depends on numpy, scikit-learn and scipy. A working Fortran
43-
compiler is also required to build the package, for Mac users,
44-
``brew install gcc`` will take care of this requirement.
60+
``glmnet`` depends on numpy, scikit-learn and scipy.
61+
A working Fortran compiler is also required to build the package.
62+
For Mac users, ``brew install gcc`` will take care of this requirement.
4563

4664
.. code:: bash
4765

dev-requirements.txt

+5-2
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,5 @@
1-
pytest == 3.*
2-
nose >= 1.3
1+
# Pin exact dependency version numbers for local dev and CircleCI.
2+
numpy==1.19.0
3+
pytest==5.4.3
4+
scikit-learn==0.23.1
5+
scipy==1.5.0

glmnet/__init__.py

+3-4
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
1+
import pkg_resources
2+
13
from .logistic import LogitNet
24
from .linear import ElasticNet
3-
from ._version import get_versions
45

56
__all__ = ['LogitNet', 'ElasticNet']
67

7-
8-
__version__ = get_versions()['version']
9-
del get_versions
8+
__version__ = pkg_resources.get_distribution("glmnet").version

0 commit comments

Comments
 (0)