Skip to content

Commit

Permalink
Merge pull request #53 from N-Wouda/update-dependency-management
Browse files Browse the repository at this point in the history
- Use pyproject.toml
- Drop Py3.6 (EOL December 2021)
- Drop Codacy
  • Loading branch information
N-Wouda authored Feb 26, 2022
2 parents 5a3831c + 49680bf commit 12e6b24
Show file tree
Hide file tree
Showing 10 changed files with 103 additions and 667 deletions.
2 changes: 0 additions & 2 deletions .codacy.yml

This file was deleted.

16 changes: 0 additions & 16 deletions .coveragerc

This file was deleted.

2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -68,3 +68,5 @@ venv/

# Jupyter
.ipynb_checkpoints/

*.lock
31 changes: 16 additions & 15 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,19 @@
dist: xenial
os: linux

dist: bionic

language: python

python:
- 3.6
- 3.7
- 3.8
- 3.9
- "3.7"
- "3.8"
- "3.9"

# TODO eventually I want a better build matrix here, i.a. for numpy versions

install:
- pip install pipenv
- pipenv install --dev --skip-lock
- pip install poetry
- poetry install

git:
depth: 3
Expand All @@ -23,18 +24,18 @@ branches: # since the master branch is the only one where PRs are
- /^v\d+\.\d+(\.\d+)?(-\S*)?$/ # for release tags

script:
- pipenv run pytest
- pipenv run mypy ./ || true
- poetry run pytest
- poetry run mypy alns

before_deploy:
- poetry config http-basic.pypi $PYPI_USER $PYPI_PASS
- poetry build

deploy: # deploy to PyPI on tagged commits.
provider: pypi
user: N-Wouda
password:
secure: jEir1QB2CIAfTeJZU2DXtHBSQj2TAZx6fTkONbAsN7a8KAm0edhgkiYqly9+M3wmnFTr1Q+ycjbuStCkgreC7AOYwpQLi8BjVdm13SVpGCkVXX6hK/AW+J+WWlBZfg8TxNYBauPVJBIFyEuU6NqGxqrLHu3u+DVaIvBHNgTCMixClvODwhwA0P3o1XJTe0dCZWZHGtyHUpzx1N2oSCOOtCZJJfiFOPAWV5efWe04c5n6ymUOiq3WeNydJmrpRswaA2IH2AhFRjTdyVzYEbke5P+WkwXj/Kw4tU9pyyUtMMAbZODkCZn40KUnlr37HyQ2egsGWJ5J5B93pEJg/6QZneIwFFCsXwTJqKeCKojCD6zcTvlwqfINs75xR9L20Hce0evg8RckSRy1cw8s8wEpS89JPPlj03kq5Huu4BFkiYHojSzVJXRqPFBrkx2ao66US5zvCvg9I4WTkTQ/3gWptgI+r4gM1qdeWp5PFr0irVSjUgCQ43d3zkCEtPxAte2RVr6QoIxjMAEgwSle83eqdl67QYMMb4dpdbkQHoJPFh5Sn80dEPYXyOPSVnPbHEgX1GtXnI5cMY20G7TiRxutXag24CNWdMjj6sAZhiym2zWFca2fjaUApv+JRRIZ2GsZ0GqHXmE948Fe0gH0UCLRs6FmYiQwptKUCeGfjvCm+6Q=
provider: script
script: poetry publish
on:
tags: true
distributions: "sdist bdist_wheel"
skip_existing: true

after_success:
- codecov
19 changes: 0 additions & 19 deletions Pipfile

This file was deleted.

555 changes: 0 additions & 555 deletions Pipfile.lock

This file was deleted.

3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
[![PyPI version](https://badge.fury.io/py/alns.svg)](https://badge.fury.io/py/alns)
[![Build Status](https://travis-ci.com/N-Wouda/ALNS.svg?branch=master)](https://travis-ci.com/N-Wouda/ALNS)
[![Build Status](https://app.travis-ci.com/N-Wouda/ALNS.svg?branch=master)](https://app.travis-ci.com/N-Wouda/ALNS)
[![codecov](https://codecov.io/gh/N-Wouda/ALNS/branch/master/graph/badge.svg)](https://codecov.io/gh/N-Wouda/ALNS)
[![Codacy Badge](https://api.codacy.com/project/badge/Grade/0c573395b313403b96c26054973dec34)](https://www.codacy.com/app/N-Wouda/ALNS)

This package offers a general, well-documented and tested
implementation of the adaptive large neighbourhood search (ALNS)
Expand Down
84 changes: 84 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
[tool.poetry]
name = "alns"
version = "1.4.0"
description = "A flexible implementation of the adaptive large neighbourhood search (ALNS) algorithm."
authors = ["Niels Wouda <[email protected]>"]
license = "MIT"
readme = "README.md"
repository = "https://github.com/N-Wouda/ALNS"
include = [
"LICENSE.md",
]
packages = [
{include = "alns"},
]
classifiers = [
"License :: OSI Approved :: MIT License",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Intended Audience :: Developers",
"Intended Audience :: Science/Research",
"Development Status :: 5 - Production/Stable",
"Topic :: Software Development",
"Topic :: Scientific/Engineering",
]

[tool.poetry.urls]
"Tracker" = "https://github.com/python-poetry/poetry/issues"
"Source" = "https://github.com/N-Wouda/ALNS"

[tool.poetry.dependencies]
python = "^3.7"
numpy = ">=1.15.2"
matplotlib = ">=2.2.0"

[tool.poetry.dev-dependencies]
pytest = ">=6.0.0"
pytest-cov = ">=2.6.1"
mypy = ">=0.670"
codecov = "*"

# These are solely for work on the example notebooks, and not required for
# the package itself.
networkx = ">=2.4.0"
tsplib95 = ">=0.7.0"



[tool.mypy]
# These are generally already settled anyway, so there's no real
# need to worry about them here
ignore_missing_imports = true



[tool.pytest.ini_options]
markers = [
"matplotlib: test related to matplotlib functionality.",
]

addopts = "--cov=. --cov-config .coveragerc"



[tool.coverage.run]
omit = [
"*/tests/*",
"venv/*",
]

[tool.coverage.report]
exclude_lines = [
# This excludes all abstract methods from code coverage checks,
# as they are never instantiated directly anyway
"pragma: no cover",
"@abstract"
]



[build-system]
requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api"
12 changes: 0 additions & 12 deletions setup.cfg

This file was deleted.

46 changes: 0 additions & 46 deletions setup.py

This file was deleted.

0 comments on commit 12e6b24

Please sign in to comment.