Skip to content

Commit e8201f9

Browse files
committed
Moving more config stuff around
1 parent 4f071a4 commit e8201f9

13 files changed

Lines changed: 37 additions & 54 deletions

File tree

.coveragerc

Lines changed: 0 additions & 15 deletions
This file was deleted.

.readthedocs.yml

Lines changed: 0 additions & 4 deletions
This file was deleted.

MANIFEST.in

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,13 @@ graft ci
44
graft tests
55

66
include .bumpversion.cfg
7-
include .coveragerc
87
include .cookiecutterrc
98
include .editorconfig
10-
include .isort.cfg
11-
include .readthedocs.yml
129
include .flake8
13-
include bandit.yml
14-
include pyproject.toml
1510
include codecov.yml
11+
include pytest.ini
12+
include pyproject.toml
13+
include readthedocs.yml
1614

1715

1816
include AUTHORS.rst

ci/templates/tox.ini

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ passenv =
2020
deps =
2121
pytest
2222
pytest-travis-fold
23+
coverage[toml]
2324
commands =
2425
python setup.py clean --all build_ext --force --inplace
2526
{posargs:pytest -vv --ignore=src}

flake8.ini

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
.flake8

pyproject.toml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,3 +59,18 @@ exclude = '''
5959
| dist
6060
)/
6161
'''
62+
63+
[tool.coverage.paths]
64+
source = ['src']
65+
66+
[tool.coverage.run]
67+
branch = true
68+
source = ['src', 'tests']
69+
parallel = true
70+
omit = ['src/memwiper/utils/_coretest.py']
71+
72+
[tool.coverage.report]
73+
show_missing = true
74+
precision = 2
75+
omit = ['*migrations*']
76+

readthedocs.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
version: 2
2+
formats: all
3+
python:
4+
install:
5+
- requirements: docs/requirements.txt

setup.py

Lines changed: 5 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,19 @@
11
#!/usr/bin/env python
22
# -*- encoding: utf-8 -*-
3-
from __future__ import absolute_import
4-
from __future__ import print_function
3+
from __future__ import absolute_import, print_function
54

65
import io
76
import os
87
import re
98
from glob import glob
10-
from os.path import basename
11-
from os.path import dirname
12-
from os.path import join
13-
from os.path import relpath
14-
from os.path import splitext
9+
from os.path import basename, dirname, join, relpath, splitext
1510

16-
from setuptools import Extension
17-
from setuptools import find_packages
18-
from setuptools import setup
11+
from setuptools import Extension, find_packages, setup
1912

2013

2114
def read(*names, **kwargs):
2215
with io.open(
23-
join(dirname(__file__), *names),
24-
encoding=kwargs.get("encoding", "utf8"),
16+
join(dirname(__file__), *names), encoding=kwargs.get("encoding", "utf8"),
2517
) as fh:
2618
return fh.read()
2719

@@ -33,9 +25,7 @@ def read(*names, **kwargs):
3325
os.environ["CFLAGS"] = os.environ["SETUPPY_CFLAGS"]
3426

3527
if "CFLAGS" in os.environ:
36-
os.environ["CFLAGS"] = " ".join(
37-
(os.environ["CFLAGS"], "-DMEMWIPER_DEBUG=1")
38-
)
28+
os.environ["CFLAGS"] = " ".join((os.environ["CFLAGS"], "-DMEMWIPER_DEBUG=1"))
3929
else:
4030
os.environ["CFLAGS"] = "-DMEMWIPER_DEBUG=1"
4131

src/memwiper/utils/__init__.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
from memwiper.c_src.memwiper_utils import codepoints
2-
from memwiper.c_src.memwiper_utils import kind
3-
from memwiper.c_src.memwiper_utils import size
1+
from memwiper.c_src.memwiper_utils import codepoints, kind, size
42

53
__all__ = [
64
"kind",

src/memwiper/utils/_coretest.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -67,19 +67,15 @@ def main():
6767
# "Decoding" the file:
6868
s1 = codecs.encode(sfromfile, "rot_13")
6969
# Generating pre-core
70-
print(
71-
"Generating {f}.{pid}:".format(f=corefn.format(when="pre"), pid=mypid)
72-
)
70+
print("Generating {f}.{pid}:".format(f=corefn.format(when="pre"), pid=mypid))
7371
cmd = gdb_cmds
7472
corename = corefn.format(when="pre")
7573
print(cmd.format(filename=corename, pid=mypid))
7674
subprocess.run(shlex.split(cmd.format(filename=corename, pid=mypid)))
7775
print("Now we're going to overwrite the memory,")
7876
memwiper.wipeit(s1)
7977
# Generating pos-core
80-
print(
81-
"Generating {f}.{pid}:".format(f=corefn.format(when="pos"), pid=mypid)
82-
)
78+
print("Generating {f}.{pid}:".format(f=corefn.format(when="pos"), pid=mypid))
8379
corename = corefn.format(when="pos")
8480
print(cmd.format(filename=corename, pid=mypid))
8581
subprocess.run(shlex.split(cmd.format(filename=corename, pid=mypid)))

0 commit comments

Comments
 (0)