GO-Diff 1.0.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- go_diff-1.0.0/.github/workflows/auto-tag.yml +49 -0
- go_diff-1.0.0/.github/workflows/publish.yml +88 -0
- go_diff-1.0.0/.github/workflows/tests.yml +46 -0
- go_diff-1.0.0/.gitignore +11 -0
- go_diff-1.0.0/.readthedocs.yaml +23 -0
- go_diff-1.0.0/LICENSE +674 -0
- go_diff-1.0.0/PKG-INFO +153 -0
- go_diff-1.0.0/README.md +131 -0
- go_diff-1.0.0/VERSION +1 -0
- go_diff-1.0.0/docs/Makefile +19 -0
- go_diff-1.0.0/docs/make.bat +35 -0
- go_diff-1.0.0/docs/requirements.txt +3 -0
- go_diff-1.0.0/docs/source/concepts.rst +141 -0
- go_diff-1.0.0/docs/source/conf.py +32 -0
- go_diff-1.0.0/docs/source/index.rst +26 -0
- go_diff-1.0.0/docs/source/installation.rst +60 -0
- go_diff-1.0.0/docs/source/overview.rst +62 -0
- go_diff-1.0.0/docs/source/references.rst +69 -0
- go_diff-1.0.0/docs/source/troubleshooting.rst +120 -0
- go_diff-1.0.0/docs/source/tutorial/quickstart.rst +146 -0
- go_diff-1.0.0/docs/source/tutorial/tutorial.rst +7 -0
- go_diff-1.0.0/go_diff/__init__.py +3 -0
- go_diff-1.0.0/go_diff/controllers/__init__.py +4 -0
- go_diff-1.0.0/go_diff/controllers/buffer.py +89 -0
- go_diff-1.0.0/go_diff/controllers/sample.py +98 -0
- go_diff-1.0.0/go_diff/controllers/temperature.py +116 -0
- go_diff-1.0.0/go_diff/controllers/training.py +407 -0
- go_diff-1.0.0/go_diff/filter.py +70 -0
- go_diff-1.0.0/go_diff/go_diff.py +751 -0
- go_diff-1.0.0/go_diff/logger.py +453 -0
- go_diff-1.0.0/go_diff/noisers/__init__.py +1 -0
- go_diff-1.0.0/go_diff/noisers/weighted_pos.py +59 -0
- go_diff-1.0.0/go_diff/utils.py +50 -0
- go_diff-1.0.0/pyproject.toml +39 -0
- go_diff-1.0.0/scripts/heptamer.py +70 -0
- go_diff-1.0.0/scripts/heptamer_ffg.py +72 -0
- go_diff-1.0.0/scripts/stepped_pt.py +69 -0
- go_diff-1.0.0/scripts/stepped_pt_ffg.py +73 -0
- go_diff-1.0.0/tests/__init__.py +0 -0
- go_diff-1.0.0/tests/conftest.py +78 -0
- go_diff-1.0.0/tests/test_godiff.py +322 -0
- go_diff-1.0.0/tests/test_sample_controller.py +68 -0
- go_diff-1.0.0/tests/test_temperature.py +81 -0
- go_diff-1.0.0/uv.lock +2905 -0
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
name: Auto Tag on Version Bump
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches:
|
|
6
|
+
- main
|
|
7
|
+
paths:
|
|
8
|
+
- 'VERSION' # The workflow now triggers ONLY when the VERSION file changes
|
|
9
|
+
|
|
10
|
+
jobs:
|
|
11
|
+
create_tag:
|
|
12
|
+
runs-on: ubuntu-latest
|
|
13
|
+
permissions:
|
|
14
|
+
contents: write
|
|
15
|
+
|
|
16
|
+
steps:
|
|
17
|
+
- name: Checkout code
|
|
18
|
+
uses: actions/checkout@v4
|
|
19
|
+
|
|
20
|
+
- name: Extract version from VERSION file
|
|
21
|
+
id: get_version
|
|
22
|
+
# Reading a plain text file is as simple as using 'cat'
|
|
23
|
+
run: |
|
|
24
|
+
VERSION=$(cat VERSION | tr -d '[:space:]') # tr removes trailing newlines just in case
|
|
25
|
+
echo "version=$VERSION" >> $GITHUB_OUTPUT
|
|
26
|
+
echo "Detected version: $VERSION"
|
|
27
|
+
|
|
28
|
+
- name: Check if tag already exists
|
|
29
|
+
id: check_tag
|
|
30
|
+
run: |
|
|
31
|
+
TAG="v${{ steps.get_version.outputs.version }}"
|
|
32
|
+
if git ls-remote --tags origin | grep -q "refs/tags/$TAG"; then
|
|
33
|
+
echo "Tag $TAG already exists."
|
|
34
|
+
echo "exists=true" >> $GITHUB_OUTPUT
|
|
35
|
+
else
|
|
36
|
+
echo "Tag $TAG does not exist. Proceeding."
|
|
37
|
+
echo "exists=false" >> $GITHUB_OUTPUT
|
|
38
|
+
fi
|
|
39
|
+
|
|
40
|
+
- name: Create and push tag
|
|
41
|
+
if: steps.check_tag.outputs.exists == 'false'
|
|
42
|
+
run: |
|
|
43
|
+
TAG="v${{ steps.get_version.outputs.version }}"
|
|
44
|
+
|
|
45
|
+
git config user.name "github-actions[bot]"
|
|
46
|
+
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
|
|
47
|
+
|
|
48
|
+
git tag "$TAG"
|
|
49
|
+
git push origin "$TAG"
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
name: Publish Python 🐍 distribution 📦 to PyPI and TestPyPI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
tags:
|
|
6
|
+
- 'v*' # Triggers on tag pushes
|
|
7
|
+
workflow_dispatch: # Triggers on manual button clicks
|
|
8
|
+
|
|
9
|
+
jobs:
|
|
10
|
+
# ---------------------------------------------------------
|
|
11
|
+
# JOB 1: Build the package (Runs every time)
|
|
12
|
+
# ---------------------------------------------------------
|
|
13
|
+
build:
|
|
14
|
+
name: Build package
|
|
15
|
+
runs-on: ubuntu-latest
|
|
16
|
+
steps:
|
|
17
|
+
- uses: actions/checkout@v4
|
|
18
|
+
|
|
19
|
+
- name: Set up Python
|
|
20
|
+
uses: actions/setup-python@v5
|
|
21
|
+
with:
|
|
22
|
+
python-version: '3.x'
|
|
23
|
+
|
|
24
|
+
- name: Install build dependencies
|
|
25
|
+
run: python -m pip install --upgrade pip build
|
|
26
|
+
|
|
27
|
+
- name: Build the package
|
|
28
|
+
run: python -m build
|
|
29
|
+
|
|
30
|
+
- name: Store the distribution packages
|
|
31
|
+
uses: actions/upload-artifact@v4
|
|
32
|
+
with:
|
|
33
|
+
name: python-package-distributions
|
|
34
|
+
path: dist/
|
|
35
|
+
|
|
36
|
+
# ---------------------------------------------------------
|
|
37
|
+
# JOB 2: Publish to TestPyPI (ONLY runs on Tag Push)
|
|
38
|
+
# ---------------------------------------------------------
|
|
39
|
+
publish-to-testpypi:
|
|
40
|
+
name: Publish to TestPyPI
|
|
41
|
+
needs: build
|
|
42
|
+
if: github.event_name == 'push' # The magic condition
|
|
43
|
+
runs-on: ubuntu-latest
|
|
44
|
+
|
|
45
|
+
environment:
|
|
46
|
+
name: testpypi
|
|
47
|
+
url: https://test.pypi.org/p/go-diff
|
|
48
|
+
|
|
49
|
+
permissions:
|
|
50
|
+
id-token: write
|
|
51
|
+
|
|
52
|
+
steps:
|
|
53
|
+
- name: Download all the dists
|
|
54
|
+
uses: actions/download-artifact@v4
|
|
55
|
+
with:
|
|
56
|
+
name: python-package-distributions
|
|
57
|
+
path: dist/
|
|
58
|
+
|
|
59
|
+
- name: Publish to TestPyPI
|
|
60
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
|
61
|
+
with:
|
|
62
|
+
repository-url: https://test.pypi.org/legacy/
|
|
63
|
+
|
|
64
|
+
# ---------------------------------------------------------
|
|
65
|
+
# JOB 3: Publish to real PyPI (ONLY runs Manually)
|
|
66
|
+
# ---------------------------------------------------------
|
|
67
|
+
publish-to-pypi:
|
|
68
|
+
name: Publish to PyPI
|
|
69
|
+
needs: build
|
|
70
|
+
if: github.event_name == 'workflow_dispatch' # The magic condition
|
|
71
|
+
runs-on: ubuntu-latest
|
|
72
|
+
|
|
73
|
+
environment:
|
|
74
|
+
name: pypi
|
|
75
|
+
url: https://pypi.org/p/go-diff # Replace with your package name
|
|
76
|
+
|
|
77
|
+
permissions:
|
|
78
|
+
id-token: write
|
|
79
|
+
|
|
80
|
+
steps:
|
|
81
|
+
- name: Download all the dists
|
|
82
|
+
uses: actions/download-artifact@v4
|
|
83
|
+
with:
|
|
84
|
+
name: python-package-distributions
|
|
85
|
+
path: dist/
|
|
86
|
+
|
|
87
|
+
- name: Publish to PyPI
|
|
88
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
name: Python package
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [ "main" ]
|
|
6
|
+
pull_request:
|
|
7
|
+
branches: [ "main" ]
|
|
8
|
+
|
|
9
|
+
permissions:
|
|
10
|
+
contents: read
|
|
11
|
+
|
|
12
|
+
jobs:
|
|
13
|
+
validate-lockfile:
|
|
14
|
+
name: Validate uv.lock
|
|
15
|
+
runs-on: ubuntu-latest
|
|
16
|
+
steps:
|
|
17
|
+
- uses: actions/checkout@v4
|
|
18
|
+
- name: Install uv
|
|
19
|
+
uses: astral-sh/setup-uv@v5
|
|
20
|
+
- name: Verify uv.lock is up to date
|
|
21
|
+
run: uv lock --check
|
|
22
|
+
|
|
23
|
+
build:
|
|
24
|
+
name: Test Python ${{ matrix.python-version }}
|
|
25
|
+
needs: validate-lockfile # Fails fast before running the matrix if the lock is out of date
|
|
26
|
+
runs-on: ubuntu-latest
|
|
27
|
+
strategy:
|
|
28
|
+
fail-fast: false
|
|
29
|
+
matrix:
|
|
30
|
+
python-version: ["3.12", "3.13"]
|
|
31
|
+
|
|
32
|
+
steps:
|
|
33
|
+
- uses: actions/checkout@v4
|
|
34
|
+
|
|
35
|
+
- name: Install uv
|
|
36
|
+
uses: astral-sh/setup-uv@v5
|
|
37
|
+
with:
|
|
38
|
+
enable-cache: true
|
|
39
|
+
|
|
40
|
+
- name: Install dependencies
|
|
41
|
+
# uv fetches the target Python version and syncs the exact locked environment
|
|
42
|
+
run: uv sync --python ${{ matrix.python-version }} --extra test
|
|
43
|
+
|
|
44
|
+
- name: Test with pytest
|
|
45
|
+
run: uv run pytest
|
|
46
|
+
|
go_diff-1.0.0/.gitignore
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# .readthedocs.yaml
|
|
2
|
+
# Read the Docs configuration file
|
|
3
|
+
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
|
|
4
|
+
|
|
5
|
+
# Required
|
|
6
|
+
version: 2
|
|
7
|
+
|
|
8
|
+
# Set the OS, Python version and other tools you might need
|
|
9
|
+
build:
|
|
10
|
+
os: ubuntu-22.04
|
|
11
|
+
tools:
|
|
12
|
+
python: "3.11"
|
|
13
|
+
|
|
14
|
+
# Build documentation in the "docs/" directory with Sphinx
|
|
15
|
+
sphinx:
|
|
16
|
+
configuration: docs/source/conf.py
|
|
17
|
+
|
|
18
|
+
# Optional but recommended, declare the Python requirements required
|
|
19
|
+
# to build your documentation
|
|
20
|
+
# See https://docs.readthedocs.io/en/stable/guides/reproducible-builds.html
|
|
21
|
+
python:
|
|
22
|
+
install:
|
|
23
|
+
- requirements: docs/requirements.txt
|