Skip to content

Commit

Permalink
Merge pull request #17 from jacanchaplais/feature/edge-efficient-16
Browse files Browse the repository at this point in the history
Improved COO graph construction algorithm #16
  • Loading branch information
jacanchaplais authored Aug 14, 2023
2 parents b5a9d36 + 4eb51d5 commit 6191064
Show file tree
Hide file tree
Showing 9 changed files with 292 additions and 228 deletions.
1 change: 0 additions & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ name: tests

on:
- push
- pull_request

jobs:
test:
Expand Down
46 changes: 36 additions & 10 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,14 +1,40 @@
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v3.2.0
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
- id: check-added-large-files
- repo: https://github.com/psf/black
rev: 22.3.0
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
- id: check-added-large-files
- id: check-merge-conflict
- id: debug-statements
- id: name-tests-test
args: ["--pytest-test-first"]
- id: no-commit-to-branch
args: ["--branch", "main", "--branch", "develop"]
- repo: https://github.com/psf/black
rev: 23.3.0
hooks:
- id: black
- id: black
- repo: https://github.com/pycqa/isort
rev: 5.12.0
hooks:
- id: isort
name: isort (python)
args: ["--profile", "black", "--filter-files"]
- repo: https://github.com/asottile/pyupgrade
rev: v3.4.0
hooks:
- id: pyupgrade
args: ["--py38-plus"]
- repo: https://github.com/PyCQA/autoflake
rev: v2.1.1
hooks:
- id: autoflake
args: [
"--in-place",
"--remove-all-unused-imports",
"--ignore-init-module-imports",
"--expand-star-imports",
]
49 changes: 0 additions & 49 deletions README.md

This file was deleted.

64 changes: 64 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
showerpipe
==========

|PyPI version| |Tests| |Documentation| |License| |Code style: black|

Provides a Pythonic data pipeline for showering and hadronisation
programs in HEP.

Currently wraps interface for Pythia 8, with plans for Herwig and
Ariadne in future releases.

Installation
------------

This package requires Pythia 8 to be installed on your system, and
available in your ``PYTHONPATH``.

It also requires the ``PYTHIA8DATA`` environment variable to be set.
This is the path to the ``xmldoc/`` directory under Pythia’s ``share``
directory. You can do something like this in your shell config:

.. code:: bash
export PYTHIA8DATA=/home/$USER/pythia82xx/share/Pythia8/xmldoc
Without an existing Pythia installation (using conda)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

If this is not already the case, a very convenient solution is to
install it via ``conda``. This is fast, and automatically sets the
``PYTHIA8DATA`` environment variable when you activate the virtual
environment. An environment file is provided in the root of this repo,
which will install all requirements and then showerpipe, automatically.
The virtual environment can be created using:

.. code:: bash
conda env create -f environment.yml
If you have an existing conda environment, you can update it by
activating the environment and then using:

.. code:: bash
conda env update -f environment.yml --prune
With existing Pythia installation
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Simply:

.. code:: bash
pip install showerpipe
.. |PyPI version| image:: https://img.shields.io/pypi/v/showerpipe.svg
:target: https://pypi.org/project/showerpipe/
.. |Tests| image:: https://github.com/jacanchaplais/showerpipe/actions/workflows/tests.yml/badge.svg
.. |Documentation| image:: https://readthedocs.org/projects/showerpipe/badge/?version=latest
:target: https://showerpipe.readthedocs.io
.. |License| image:: https://img.shields.io/pypi/l/showerpipe
:target: https://raw.githubusercontent.com/jacanchaplais/showerpipe/main/LICENSE.txt
.. |Code style: black| image:: https://img.shields.io/badge/code%20style-black-000000.svg
:target: https://github.com/psf/black
2 changes: 1 addition & 1 deletion docs/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
Welcome to showerpipe's documentation!
====================================

.. mdinclude:: ../../README.md
.. include:: ../../README.rst

.. toctree::
:caption: API Reference
Expand Down
46 changes: 46 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,43 @@ build-backend = "setuptools.build_meta"
[tool.setuptools_scm]
write_to = "showerpipe/_version.py"

[project]
name = "showerpipe"
dynamic = ["version"]
authors = [{name = "Jacan Chaplais"}]
maintainers = [{name = "Jacan Chaplais"}]
description = "Data pipeline tools for particle shower and hadronisation."
readme = {file = "README.rst", content-type = "text/x-rst"}
requires-python = ">=3.8"
license = {file = "LICENSE.txt"}
classifiers = [
"Programming Language :: Python :: 3",
"License :: OSI Approved :: BSD License",
"Operating System :: OS Independent"
]
dependencies = [
"requests",
"lxml",
"numpy",
"pandas",
"rich",
]

[project.urls]
repository = "https://github.com/jacanchaplais/showerpipe"
documentation = "https://showerpipe.readthedocs.io"

[project.optional-dependencies]
dev = [
"pre-commit ==2.19.0",
"flake8 ==3.9.2",
"tox ==3.24.3",
"pytest ==6.2.5",
"pytest-cov ==2.12.1",
"hypothesis ==6.62.0",
"mypy ==0.910",
]

[tool.black]
line-length = 79

Expand All @@ -21,3 +58,12 @@ warn_return_any = true
warn_unreachable = true
warn_unused_configs = true
no_implicit_reexport = true

[tool.pyright]
include = ["showerpipe"]
exclude = ["**/node_modules", "**/__pycache__"]
defineConstant = { DEBUG = true }
reportMissingImports = true
reportMissingTypeStubs = false
pythonVersion = "3.8"
pythonPlatform = "Linux"
41 changes: 0 additions & 41 deletions setup.cfg

This file was deleted.

Loading

0 comments on commit 6191064

Please sign in to comment.