Skip to content

Commit

Permalink
some packaging changes that will surely backfire
Browse files Browse the repository at this point in the history
  • Loading branch information
pauliacomi committed Jun 6, 2020
1 parent a998484 commit d2517cd
Show file tree
Hide file tree
Showing 13 changed files with 70 additions and 109 deletions.
39 changes: 0 additions & 39 deletions .cookiecutterrc

This file was deleted.

5 changes: 4 additions & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# see http://editorconfig.org
# see https://editorconfig.org
root = true

[*]
Expand All @@ -11,3 +11,6 @@ charset = utf-8

[*.{bat,cmd,ps1}]
end_of_line = crlf

[*.{yml,yaml}]
indent_size = 2
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -104,3 +104,6 @@ ENV/

# pytest
.pytest_cache

# Generated by setuptools-scm
src/*/_version.py
6 changes: 0 additions & 6 deletions .pylintrc

This file was deleted.

21 changes: 0 additions & 21 deletions MANIFEST.in

This file was deleted.

3 changes: 1 addition & 2 deletions ci/templates/tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -38,16 +38,15 @@ passenv =
[testenv:check]
deps =
docutils
check-manifest
flake8
readme-renderer
pygments
isort
setuptools-scm
skip_install = true
usedevelop = false
commands =
python setup.py check --strict --metadata --restructuredtext
check-manifest {toxinidir}
flake8 src tests setup.py
isort --verbose --check-only --diff --recursive src tests setup.py

Expand Down
60 changes: 36 additions & 24 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -1,18 +1,32 @@
[aliases]
test = pytest

[check-manifest]
ignore =
.travis.yml
.github
.github/*

[matrix]
python_versions =
py36
py37
py38
dependencies =
coverage_flags =
cover: true
environment_variables =
-

[bumpversion]
current_version = 2.0.2
commit = True
tag = False
message = '{current_version} → {new_version}'

[bdist_wheel]
universal = 1

[aliases]
test = pytest

[bumpversion:file:setup.py]
search = version='{current_version}'
replace = version='{new_version}'
search = 'fallback_version': '{current_version}'
replace = 'fallback_version': '{new_version}'

[bumpversion:file:README.rst]
search = v{current_version}
Expand All @@ -30,6 +44,12 @@ replace = __version__ = '{new_version}'
search = version = release = '{current_version}'
replace = version = release = '{new_version}'

[pylint]
# A comma-separated list of package or module names from where C extensions may
# be loaded. Extensions are loading into the active Python interpreter and may
# run arbitrary code
extension-pkg-whitelist=numpy, pandas, matplotlib

[flake8]
max-line-length = 140
exclude = */migrations/*
Expand All @@ -38,6 +58,14 @@ exclude = */migrations/*
convention = numpy
match-dir = 'src\/.*'

[yapf]
based_on_style = pep8
dedent_closing_brackets = true
coalesce_brackets = true
spaces_before_comment=15, 20
split_complex_comprehension = true
split_before_dot = true

[tool:isort]
force_single_line = True
line_length = 120
Expand Down Expand Up @@ -110,20 +138,4 @@ exclude_lines =
if 0:
if __name__ == .__main__.:

[check-manifest]
ignore =
.travis.yml
.github
.github/*

[matrix]
python_versions =
py36
py37
py38
dependencies =
coverage_flags =
cover: true
environment_variables =
-

30 changes: 20 additions & 10 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,22 +14,32 @@


def read(*names, **kwargs):
with io.open(join(dirname(__file__), *names),
encoding=kwargs.get('encoding', 'utf8')) as fh:
with io.open(
join(dirname(__file__), *names),
encoding=kwargs.get('encoding', 'utf8')
) as fh:
return fh.read()


def remove_badges(text):
"""Remove badge text from the readme."""
return re.compile('^.. start-badges.*^.. end-badges',
re.M | re.S).sub('', text)


setup(
name='pygaps',
version='2.0.2',
use_scm_version={
'local_scheme': 'dirty-tag',
'write_to': 'src/pygaps/_version.py',
'fallback_version': '2.0.2',
},
license='MIT license',
description= # noqa: E251
"""A framework for processing adsorption data for porous materials""",
long_description='%s' %
(re.compile('^.. start-badges.*^.. end-badges', re.M | re.S).sub(
'', read('README.rst'))),
long_description=remove_badges(read('README.rst')),
author='Paul Iacomi',
author_email='iacomi.paul@gmail.com',
author_email='mail@pauliacomi.com',
url='https://github.com/pauliacomi/pygaps',
project_urls={
"Documentation": 'https://pygaps.readthedocs.io',
Expand All @@ -40,8 +50,7 @@ def read(*names, **kwargs):
py_modules=[splitext(basename(path))[0] for path in glob('src/*.py')],
include_package_data=True,
zip_safe=False,
classifiers=[
# complete classifier list: https://pypi.org/pypi?%3Aaction=list_classifiers
classifiers=[ # Classifier list at https://pypi.org/pypi?%3Aaction=list_classifiers
'Development Status :: 5 - Production/Stable',
'Intended Audience :: Science/Research',
'License :: OSI Approved :: MIT License',
Expand All @@ -53,12 +62,13 @@ def read(*names, **kwargs):
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: Implementation :: CPython',
# 'Programming Language :: Python :: Implementation :: PyPy3',
'Intended Audience :: Science/Research',
'Topic :: Scientific/Engineering :: Physics',
],
keywords=['adsorption', 'characterization', 'porous materials'],
python_requires='>=3.6',
setup_requires=[
'setuptools_scm',
'pytest-runner',
],
install_requires=[
Expand Down
2 changes: 1 addition & 1 deletion src/pygaps/characterisation/area_bet.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"""This module contains BET area calculations."""

import warnings
import textwrap
import warnings

import scipy.constants as const
import scipy.stats
Expand Down
2 changes: 1 addition & 1 deletion src/pygaps/characterisation/area_langmuir.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"""This module contains Langmuir area calculations."""

import warnings
import textwrap
import warnings

import scipy.constants as const
import scipy.stats as stats
Expand Down
2 changes: 1 addition & 1 deletion src/pygaps/characterisation/iast.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"""Module calculating IAST, given the pure-component adsorption isotherm model."""

import warnings
import textwrap
import warnings

import numpy
import scipy.optimize
Expand Down
3 changes: 2 additions & 1 deletion src/pygaps/core/pointisotherm.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@
This module contains the main class that describes an isotherm through discrete points.
"""

import textwrap

import matplotlib.pyplot as plt
import numpy
import pandas
import textwrap

from ..graphing.isothermgraphs import plot_iso
from ..utilities.exceptions import CalculationError
Expand Down
3 changes: 1 addition & 2 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -38,16 +38,15 @@ passenv =
[testenv:check]
deps =
docutils
check-manifest
flake8
readme-renderer
pygments
isort
setuptools-scm
skip_install = true
usedevelop = false
commands =
python setup.py check --strict --metadata --restructuredtext
check-manifest {toxinidir}
flake8 src tests setup.py
isort --verbose --check-only --diff --recursive src tests setup.py

Expand Down

0 comments on commit d2517cd

Please sign in to comment.