Skip to content
Snippets Groups Projects
Commit d924aa8b authored by Tamas Gal's avatar Tamas Gal :speech_balloon:
Browse files

Restructure project

parent 19c8ec8d
No related branches found
No related tags found
1 merge request!69Restructure project
Showing
with 118 additions and 110 deletions
...@@ -2,12 +2,9 @@ ...@@ -2,12 +2,9 @@
source = km3io source = km3io
[report] [report]
include =
km3io/*
omit = omit =
tests/* src/km3io/definitions/*
km3io/definitions/* src/km3io/version.py
km3io/version.py
exclude_lines = exclude_lines =
pragma: no cover pragma: no cover
raise AssertionError raise AssertionError
......
...@@ -6,51 +6,21 @@ __pycache__/ ...@@ -6,51 +6,21 @@ __pycache__/
# C extensions # C extensions
*.so *.so
# Version info
km3io/version.py
# Distribution / packaging # Distribution / packaging
.Python .Python
env/ venv/
bin/
build/ build/
develop-eggs/ develop-eggs/
dist/ dist/
eggs/ eggs/
lib/
lib64/
parts/
sdist/ sdist/
var/
*.egg-info/ *.egg-info/
.installed.cfg
*.egg *.egg
.eggs
pip-wheel-metadata
# Installer logs
pip-log.txt
pip-delete-this-directory.txt
# Unit test / coverage reports # Unit test / coverage reports
htmlcov/
.tox/
.coverage .coverage
.cache .cache
nosetests.xml reports
coverage.xml
.coverage.*
# Translations
*.mo
# Mr Developer
.mr.developer.cfg
.project
.pydevproject
# Rope
.ropeproject
# Sphinx documentation # Sphinx documentation
doc/_build/ doc/_build/
...@@ -58,28 +28,12 @@ doc/auto_examples/ ...@@ -58,28 +28,12 @@ doc/auto_examples/
doc/modules/ doc/modules/
doc/api doc/api
# VI swap files
*.swp
*.swo
# PyCharm files
.idea
# jupyter files # jupyter files
.ipynb_checkpoints/ .ipynb_checkpoints/
#
junit*.xml
reports
# misc
*~
*.dqd
*.dat
.pytest_cache/ .pytest_cache/
.DS_Store junit.xml
.mypy_cache
# venv, pyenv tmp # Version info
.python-version src/km3io/version.py
venv
...@@ -8,7 +8,6 @@ variables: ...@@ -8,7 +8,6 @@ variables:
cache: cache:
paths: paths:
- .cache/pip - .cache/pip
- venv/
key: "$CI_COMMIT_REF_SLUG" key: "$CI_COMMIT_REF_SLUG"
stages: stages:
......
include README.rst include README.rst CHANGELOG.rst CONTRIBUTING.rst
include LICENSE include LICENSE
include requirements.txt include setup.py setup.cfg pyproject.toml
include src/km3io/version.py
recursive-include tests
...@@ -18,7 +18,7 @@ test: ...@@ -18,7 +18,7 @@ test:
py.test --junitxml=./reports/junit.xml -o junit_suite_name=$(PKGNAME) tests py.test --junitxml=./reports/junit.xml -o junit_suite_name=$(PKGNAME) tests
test-cov: test-cov:
py.test --cov ./km3io --cov-report term-missing --cov-report xml:reports/coverage.xml --cov-report html:reports/coverage tests py.test --cov src/km3io --cov-report term-missing --cov-report xml:reports/coverage.xml --cov-report html:reports/coverage tests
test-loop: test-loop:
py.test tests py.test tests
...@@ -40,7 +40,7 @@ dependencies: ...@@ -40,7 +40,7 @@ dependencies:
.PHONY: black .PHONY: black
black: black:
black --exclude '/_definitions/|version.py' km3io black --exclude '/_definitions/|version.py' src/km3io
black examples black examples
black tests black tests
black doc/conf.py black doc/conf.py
...@@ -48,7 +48,7 @@ black: ...@@ -48,7 +48,7 @@ black:
.PHONY: black-check .PHONY: black-check
black-check: black-check:
black --check --exclude '/_definitions/|version.py' km3io black --check --exclude '/_definitions/|version.py' src/km3io
black --check examples black --check examples
black --check tests black --check tests
black --check doc/conf.py black --check doc/conf.py
......
...@@ -51,7 +51,7 @@ exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"] ...@@ -51,7 +51,7 @@ exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"]
# AutoAPI # AutoAPI
autoapi_type = "python" autoapi_type = "python"
autoapi_dirs = ["../km3io"] autoapi_dirs = ["../src/km3io"]
autoapi_options = ["members", "undoc-members", "show-module-summary"] autoapi_options = ["members", "undoc-members", "show-module-summary"]
autoapi_include_summaries = True autoapi_include_summaries = True
......
...@@ -2,4 +2,4 @@ ...@@ -2,4 +2,4 @@
requires = ["setuptools>=42", "wheel", "setuptools_scm[toml]>=3.4"] requires = ["setuptools>=42", "wheel", "setuptools_scm[toml]>=3.4"]
[tool.setuptools_scm] [tool.setuptools_scm]
write_to = "km3io/version.py" write_to = "src/km3io/version.py"
[metadata]
name = km3io
description = "KM3NeT I/O library without ROOT"
long_description = file: README.rst
long_description_content_type = text/x-rst
url = https://git.km3net.de/km3py/km3io
author = "Tamas Gal and Zineb Aly"
author_email = tgal@km3net.de
maintainer = Tamas Gal
maintainer_email = tgal@km3net.de
license = MIT
license_file = LICENSE
classifiers =
Development Status :: 5 - Production/Stable
Intended Audience :: Developers
Intended Audience :: Science/Research
License :: OSI Approved :: BSD License
Operating System :: OS Independent
Programming Language :: Python
Programming Language :: Python :: 3
Programming Language :: Python :: 3 :: Only
Programming Language :: Python :: 3.6
Programming Language :: Python :: 3.7
Programming Language :: Python :: 3.8
Programming Language :: Python :: 3.9
Programming Language :: Python :: 3.10
Topic :: Scientific/Engineering
keywords =
neutrino
astroparticle
physics
HEP
root
[options]
packages = find:
install_requires =
docopt
numba>=0.50
awkward>=1.0.0rc2
awkward0
uproot3>=3.11.1
uproot>=4.2.2
setuptools_scm
python_requires = >=3.6
include_package_data = True
package_dir =
=src
[options.packages.find]
where = src
[options.extras_require]
all =
dev =
black==21.6b0
km3net-testdata>=0.2.26
ipykernel
matplotlib
memory_profiler
numpydoc
pillow
pytest
pytest-cov
pytest-flake8
pytest-pylint
pytest-watch
scipy
sphinx
sphinx-autoapi
sphinx-gallery>=0.1.12
sphinx_rtd_theme
sphinxcontrib-versioning
wheel
[options.entry_points]
console_scripts =
KPrintTree = km3io.utils.kprinttree:main
[options.package_data]
* = *.mplstyle, *.py.typed
[bdist_wheel]
universal = 1
[tool:pytest]
junit_family = xunit2
addopts = -vv -rs -Wd
testpaths =
tests
[check-manifest]
ignore =
src/km3pipe/version.py
[tool:isort]
profile = black
multi_line_output = 3
#!/usr/bin/env python #!/usr/bin/env python3
# Filename: setup.py
"""
The km3io setup script.
"""
import os
from setuptools import setup from setuptools import setup
import sys
def read_requirements(kind):
"""Return a list of stripped lines from a file"""
with open(os.path.join("requirements", kind + ".txt")) as fobj:
return [l.strip() for l in fobj.readlines()]
try:
with open("README.rst") as fh:
long_description = fh.read()
except UnicodeDecodeError:
long_description = "km3io, a library to read KM3NeT files without ROOT"
setup(
name="km3io",
url="http://git.km3net.de/km3py/km3io",
description="KM3NeT I/O without ROOT",
long_description=long_description,
author="Zineb Aly, Tamas Gal, Johannes Schumann",
author_email="zaly@km3net.de, tgal@km3net.de, johannes.schumann@fau.de",
packages=["km3io"],
include_package_data=True,
platforms="any",
setup_requires=["setuptools_scm"],
use_scm_version=True,
install_requires=read_requirements("install"),
extras_require={kind: read_requirements(kind) for kind in ["dev"]},
python_requires=">=3.6",
entry_points={"console_scripts": ["KPrintTree=km3io.utils.kprinttree:main"]},
classifiers=[
"Intended Audience :: Developers",
"Intended Audience :: Science/Research",
"Programming Language :: Python",
],
)
__author__ = "Zineb Aly, Tamas Gal and Johannes Schumann" setup()
File moved
File moved
File moved
File moved
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment