Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
58 changes: 58 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
name: Bug report
description: Report incorrect behavior or a crash in ECNet
title: "[Bug]: "
labels: ["bug"]
body:
- type: markdown
attributes:
value: |
Thanks for a clear report. For security issues, email the maintainer
instead of opening a public issue (see `SECURITY.md`).
- type: textarea
id: description
attributes:
label: Description
description: What went wrong?
validations:
required: true
- type: textarea
id: reproduce
attributes:
label: Steps to reproduce
description: Minimal code or commands that trigger the problem.
render: shell
validations:
required: true
- type: textarea
id: expected
attributes:
label: Expected behavior
validations:
required: true
- type: input
id: version
attributes:
label: ECNet version
placeholder: e.g. 4.1.4
validations:
required: true
- type: input
id: python
attributes:
label: Python version
placeholder: e.g. 3.12.7
validations:
required: true
- type: input
id: os
attributes:
label: Operating system
placeholder: e.g. Ubuntu 22.04, macOS 15
validations:
required: true
- type: textarea
id: logs
attributes:
label: Error output
description: Paste relevant traceback or logs.
render: text
5 changes: 5 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
blank_issues_enabled: true
contact_links:
- name: Security vulnerability
url: https://github.com/ecrl/ecnet/blob/master/SECURITY.md
about: Report security issues privately per SECURITY.md (do not use public issues).
32 changes: 32 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Feature request
description: Propose an enhancement that fits the current API stability policy
title: "[Feature]: "
labels: ["enhancement"]
body:
- type: markdown
attributes:
value: |
Describe the use case and how it relates to the frozen public surface
documented in the Sphinx *API stability* page. Breaking API changes
require explicit maintainer approval.
- type: textarea
id: problem
attributes:
label: Problem or motivation
description: What gap does this fill?
validations:
required: true
- type: textarea
id: proposal
attributes:
label: Proposed solution
description: API sketch or workflow change (additive preferred).
validations:
required: true
- type: textarea
id: alternatives
attributes:
label: Alternatives considered
description: Workarounds or other approaches you evaluated.
validations:
required: false
13 changes: 13 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
version: 2
updates:
- package-ecosystem: pip
directory: "/"
schedule:
interval: weekly
open-pull-requests-limit: 5

- package-ecosystem: github-actions
directory: "/"
schedule:
interval: weekly
open-pull-requests-limit: 5
16 changes: 16 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
## Summary

<!-- What does this PR change and why? -->

## Checklist

- [ ] Tests added or updated for new behavior
- [ ] Docs updated if user-facing behavior or API narrative changed
- [ ] `CHANGELOG.md` `[Unreleased]` entry added when the change is user-visible
- [ ] Public import signatures remain compatible within the current series
(or a design note documents an intentional exception)
- [ ] Local checks pass (`pre-commit`, `ruff check src tests`, `pytest`)

## Test plan

<!-- How did you verify this change? -->
85 changes: 85 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
name: CI

on:
push:
pull_request:

jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Install package with dev extras
run: |
python -m pip install --upgrade pip
pip install -e ".[dev]"
- name: Ruff check
run: ruff check src tests
- name: Ruff format
run: ruff format --check src tests
- name: Pre-commit
run: pre-commit run --all-files

test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.11", "3.12"]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- uses: actions/setup-java@v4
with:
distribution: temurin
java-version: "17"
- name: Install package with dev extras
run: |
python -m pip install --upgrade pip
pip install -e ".[dev]"
- name: Pytest with coverage gate
run: >
pytest tests/ -v
--cov=ecnet
--cov-report=term-missing
--cov-fail-under=90

audit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Install package with dev extras
run: |
python -m pip install --upgrade pip
pip install -e ".[dev]"
- name: pip-audit
run: |
set -euo pipefail
ignore_args=()
while IFS= read -r id; do
[[ -z "${id}" || "${id}" =~ ^# ]] && continue
ignore_args+=(--ignore-vuln "${id}")
done < docs/pip-audit-ignores.txt
pip-audit "${ignore_args[@]}"

docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Install package with docs extras
run: |
python -m pip install --upgrade pip
pip install -e ".[docs]"
- name: Sphinx HTML (warnings as errors)
run: sphinx-build -W -b html docs/source docs/_build/html
30 changes: 0 additions & 30 deletions .github/workflows/publish_to_pypi.yml

This file was deleted.

38 changes: 38 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Release to PyPI

on:
release:
types: [published]
workflow_dispatch:

permissions:
contents: read

jobs:
publish:
runs-on: ubuntu-latest
environment:
name: pypi
url: https://pypi.org/p/ecnet
permissions:
contents: read
id-token: write
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.12"

- name: Install build frontend
run: |
python -m pip install --upgrade pip
pip install build

- name: Build sdist and wheel
run: python -m build

- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@ba38be9e461d3875417946c167d0b5f3d385a247 # v1.14.1
26 changes: 0 additions & 26 deletions .github/workflows/run_tests.yml

This file was deleted.

65 changes: 65 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
# Virtual environments
.venv/
.venv*/
venv/

# Python bytecode / caches
__pycache__/
*.py[cod]
*$py.class
*.so
.pytest_cache/
.ruff_cache/
.mypy_cache/
.dmypy.json
.tox/
.nox/
.hypothesis/
.ipynb_checkpoints/

# Test / coverage artifacts
.coverage
.coverage.*
coverage.xml
htmlcov/
.cache/

# Build / packaging
dist/
build/
wheels/
.eggs/
*.egg-info/
*.egg
pip-wheel-metadata/
*.whl

# Docs builds
docs/_build/
docs/build/
site/

# Secrets and local env (keep example templates trackable)
.env
.env.*
!.env.example
!.env.*.example

# Legacy CWD pollution from older tests (keep package data trackable)
_temp.*
/*.pt

# OS / editor noise
.DS_Store
Thumbs.db
*.swp
*~

# Local agent tooling (maintainer-only; not part of published package)
AGENTS.md
CLAUDE.md
.github/copilot-instructions.md
.cursor/
.claude/
docs/blueprint/
docs/MATHEMATICS_VERIFICATION.md
18 changes: 18 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Local hooks. Install: pip install -e ".[dev]" && pre-commit install
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v6.0.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
- id: check-added-large-files

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.15.22
hooks:
- id: ruff
args: [--fix]
exclude: ^examples/
- id: ruff-format
exclude: ^examples/
Loading
Loading