vcsgraph 0.1.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.
Files changed (43) hide show
  1. vcsgraph-0.1.0/.coveragerc +7 -0
  2. vcsgraph-0.1.0/.dockerignore +2 -0
  3. vcsgraph-0.1.0/.github/CODEOWNERS +1 -0
  4. vcsgraph-0.1.0/.github/dependabot.yaml +18 -0
  5. vcsgraph-0.1.0/.github/workflows/pythonpackage.yml +48 -0
  6. vcsgraph-0.1.0/.github/workflows/wheels.yaml +137 -0
  7. vcsgraph-0.1.0/.gitignore +16 -0
  8. vcsgraph-0.1.0/.mailmap +5 -0
  9. vcsgraph-0.1.0/.rsyncexclude +23 -0
  10. vcsgraph-0.1.0/.testr.conf +4 -0
  11. vcsgraph-0.1.0/CODE_OF_CONDUCT.md +76 -0
  12. vcsgraph-0.1.0/COPYING.txt +339 -0
  13. vcsgraph-0.1.0/Cargo.lock +202 -0
  14. vcsgraph-0.1.0/Cargo.toml +11 -0
  15. vcsgraph-0.1.0/MANIFEST.in +6 -0
  16. vcsgraph-0.1.0/PKG-INFO +130 -0
  17. vcsgraph-0.1.0/README.md +118 -0
  18. vcsgraph-0.1.0/crates/graph/Cargo.toml +20 -0
  19. vcsgraph-0.1.0/crates/graph/src/lib.rs +647 -0
  20. vcsgraph-0.1.0/crates/graph/src/parents_provider.rs +75 -0
  21. vcsgraph-0.1.0/crates/graph/src/test.rs +116 -0
  22. vcsgraph-0.1.0/crates/graph/src/tsort.rs +603 -0
  23. vcsgraph-0.1.0/crates/graph-py/Cargo.toml +11 -0
  24. vcsgraph-0.1.0/crates/graph-py/src/lib.rs +420 -0
  25. vcsgraph-0.1.0/pyproject.toml +113 -0
  26. vcsgraph-0.1.0/setup.cfg +4 -0
  27. vcsgraph-0.1.0/setup.py +13 -0
  28. vcsgraph-0.1.0/vcsgraph/.gitignore +1 -0
  29. vcsgraph-0.1.0/vcsgraph/__init__.py +49 -0
  30. vcsgraph-0.1.0/vcsgraph/errors.py +180 -0
  31. vcsgraph-0.1.0/vcsgraph/graph.py +1661 -0
  32. vcsgraph-0.1.0/vcsgraph/known_graph.py +370 -0
  33. vcsgraph-0.1.0/vcsgraph/py.typed +0 -0
  34. vcsgraph-0.1.0/vcsgraph/tests/__init__.py +60 -0
  35. vcsgraph-0.1.0/vcsgraph/tests/test_graph.py +1946 -0
  36. vcsgraph-0.1.0/vcsgraph/tests/test_known_graph.py +891 -0
  37. vcsgraph-0.1.0/vcsgraph/tests/test_tsort.py +709 -0
  38. vcsgraph-0.1.0/vcsgraph/tsort.py +46 -0
  39. vcsgraph-0.1.0/vcsgraph.egg-info/PKG-INFO +130 -0
  40. vcsgraph-0.1.0/vcsgraph.egg-info/SOURCES.txt +41 -0
  41. vcsgraph-0.1.0/vcsgraph.egg-info/dependency_links.txt +1 -0
  42. vcsgraph-0.1.0/vcsgraph.egg-info/requires.txt +4 -0
  43. vcsgraph-0.1.0/vcsgraph.egg-info/top_level.txt +1 -0
@@ -0,0 +1,7 @@
1
+ [run]
2
+ branch = True
3
+ source = breezy
4
+
5
+ [report]
6
+ exclude_lines =
7
+ raise NotImplementedError
@@ -0,0 +1,2 @@
1
+ Dockerfile
2
+ *~
@@ -0,0 +1 @@
1
+ * @jelmer
@@ -0,0 +1,18 @@
1
+ # Keep GitHub Actions up to date with GitHub's Dependabot...
2
+ # https://docs.github.com/en/code-security/dependabot/working-with-dependabot/keeping-your-actions-up-to-date-with-dependabot
3
+ # https://docs.github.com/en/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file#package-ecosystem
4
+ version: 2
5
+ updates:
6
+ - package-ecosystem: "cargo"
7
+ directory: "/"
8
+ schedule:
9
+ interval: "weekly"
10
+ rebase-strategy: "disabled"
11
+ - package-ecosystem: "github-actions"
12
+ directory: "/"
13
+ schedule:
14
+ interval: weekly
15
+ - package-ecosystem: "pip"
16
+ directory: "/"
17
+ schedule:
18
+ interval: weekly
@@ -0,0 +1,48 @@
1
+ name: Python package
2
+
3
+ on: [push, pull_request]
4
+
5
+ env:
6
+ PYO3_USE_ABI3_FORWARD_COMPATIBILITY: "1"
7
+
8
+ jobs:
9
+ build:
10
+
11
+ runs-on: ${{ matrix.os }}
12
+ strategy:
13
+ matrix:
14
+ os: [ubuntu-latest]
15
+ python-version: [3.9, "3.10", "3.11", '3.12', '3.13']
16
+ # See https://github.com/actions/toolkit/issues/399
17
+ # include:
18
+ # - os: ubuntu-latest
19
+ # python-version: pypy3
20
+ # experimental: true
21
+ fail-fast: false
22
+
23
+ steps:
24
+ - uses: actions/checkout@v5
25
+ - name: Set up Python ${{ matrix.python-version }}
26
+ uses: actions/setup-python@v5
27
+ with:
28
+ python-version: ${{ matrix.python-version }}
29
+ - name: Install dependencies
30
+ run: |
31
+ python -m pip install --upgrade pip
32
+ python -m pip install -e ".[dev]"
33
+ - name: Run ruff
34
+ run: |
35
+ python -m pip install ruff
36
+ ruff check .
37
+ ruff format --check .
38
+ if: "matrix.python-version != 'pypy3'"
39
+ - name: Test suite run (Linux)
40
+ run: |
41
+ python -m unittest vcsgraph.tests.test_suite
42
+ env:
43
+ PYTHONHASHSEED: random
44
+ PYTHONPATH: .
45
+ - name: Run mypy
46
+ run: |
47
+ python -m mypy vcsgraph
48
+ if: "matrix.python-version != 'pypy3'"
@@ -0,0 +1,137 @@
1
+ name: Build Python Wheels
2
+
3
+ on:
4
+ push:
5
+ pull_request:
6
+ schedule:
7
+ - cron: "0 6 * * *" # Daily 6AM UTC build
8
+
9
+ env:
10
+ PYO3_USE_ABI3_FORWARD_COMPATIBILITY: "1"
11
+
12
+ jobs:
13
+ define-matrix:
14
+ runs-on: ubuntu-latest
15
+ outputs:
16
+ matrix: ${{ steps.merged-identifiers.outputs.merged-identifiers }}
17
+
18
+ steps:
19
+ - uses: actions/checkout@v5
20
+ - uses: actions/setup-python@v5
21
+ with:
22
+ python-version: 3.x
23
+ cache: pip
24
+ - name: Install jq
25
+ run: sudo apt-get update && sudo apt-get install -y jq
26
+ - name: Install cibuildwheel
27
+ run: pip install cibuildwheel
28
+ - name: Find build identifiers using cibuildwheel --print-build-identifiers
29
+ id: all-build-identifiers
30
+ run: |
31
+ echo "linux=$(cibuildwheel --platform linux --print-build-identifiers | tr '\n' ' ')" >> $GITHUB_OUTPUT
32
+ echo "macos=$(cibuildwheel --platform macos --print-build-identifiers | tr '\n' ' ')" >> $GITHUB_OUTPUT
33
+ echo "windows=$(cibuildwheel --platform windows --print-build-identifiers | tr '\n' ' ')" >> $GITHUB_OUTPUT
34
+ - name: Select build identifiers
35
+ id: select-build-identifiers
36
+ run: |
37
+ if [[ "$GITHUB_REF" = "refs/heads/main" ]] || [[ "$GITHUB_REF" = "refs/heads/master" ]] || [[ "$GITHUB_REF" = "refs/tags/"* ]]; then
38
+ echo 'linux=${{ steps.all-build-identifiers.outputs.linux }}' >> $GITHUB_OUTPUT
39
+ echo 'windows=${{ steps.all-build-identifiers.outputs.windows }}' >> $GITHUB_OUTPUT
40
+ echo 'macos=${{ steps.all-build-identifiers.outputs.macos }}' >> $GITHUB_OUTPUT
41
+ else
42
+ echo "linux=$(echo -n '${{ steps.all-build-identifiers.outputs.linux }}' | awk '{print $NF}')" >> $GITHUB_OUTPUT
43
+ echo "macos=$(echo -n '${{ steps.all-build-identifiers.outputs.macos }}' | awk '{print $NF}')" >> $GITHUB_OUTPUT
44
+ echo "windows=$(echo -n '${{ steps.all-build-identifiers.outputs.windows }}' | awk '{print $NF}')" >> $GITHUB_OUTPUT
45
+ fi
46
+ - name: Output build identifiers
47
+ id: json-identifiers
48
+ run: |
49
+ echo "linux=$(echo -n '${{ steps.select-build-identifiers.outputs.linux }}' | jq -R -s -c 'split(" ") | map(select(length > 0)) | [.[] | {os: "ubuntu-latest", "build-identifier": .}]')" >> $GITHUB_OUTPUT
50
+ echo "macos=$(echo -n '${{ steps.select-build-identifiers.outputs.macos }}' | jq -R -s -c 'split(" ") | map(select(length > 0)) | [.[] | {os: "macos-latest", "build-identifier": .}]')" >> $GITHUB_OUTPUT
51
+ echo "windows=$(echo -n '${{ steps.select-build-identifiers.outputs.windows }}' | jq -R -s -c 'split(" ") | map(select(length > 0)) | [.[] | {os: "windows-latest", "build-identifier": .}]')" >> $GITHUB_OUTPUT
52
+ - name: Merge build identifiers
53
+ id: merged-identifiers
54
+ run: |
55
+ echo merged-identifiers=$(echo -n '${{ steps.json-identifiers.outputs.linux }} ${{ steps.json-identifiers.outputs.macos }} ${{ steps.json-identifiers.outputs.windows }}' | jq -c -s 'add') >> $GITHUB_OUTPUT
56
+
57
+ build-wheels:
58
+ runs-on: ${{ matrix.os }}
59
+ needs: define-matrix
60
+ strategy:
61
+ matrix:
62
+ os: [ubuntu-latest]
63
+ fail-fast: true
64
+
65
+ steps:
66
+ - uses: actions/checkout@v5
67
+ - uses: actions/setup-python@v5
68
+ - name: set up rust
69
+ if: matrix.os != 'ubuntu'
70
+ uses: actions-rs/toolchain@v1
71
+ with:
72
+ profile: minimal
73
+ toolchain: nightly
74
+ override: true
75
+ - name: Install native dependencies (MacOS)
76
+ run: brew install swig gpgme
77
+ if: "matrix.os == 'macos-latest'"
78
+ - name: Install dependencies
79
+ run: |
80
+ python -m pip install --upgrade pip
81
+ pip install setuptools wheel cibuildwheel
82
+ - name: Install gpg on supported platforms
83
+ run: pip install -U gpg
84
+ if: "matrix.os == 'macos-latest'"
85
+ - name: Set up QEMU
86
+ uses: docker/setup-qemu-action@v3
87
+ if: "matrix.os == 'ubuntu-latest'"
88
+ - name: Build wheels
89
+ run: python -m cibuildwheel --output-dir wheelhouse
90
+ env:
91
+ CIBW_ARCHS_MACOS: x86_64 arm64 universal2
92
+ CIBW_SKIP: '*-win32 *-musllinux_* *cp314*'
93
+ CIBW_ENVIRONMENT: 'PATH="$HOME/.cargo/bin:$PATH" PYO3_USE_ABI3_FORWARD_COMPATIBILITY="1"'
94
+ CIBW_BEFORE_BUILD: >
95
+ pip install -U setuptools-rust &&
96
+ curl https://sh.rustup.rs -sSf | sh -s -- --default-toolchain=nightly --profile=minimal -y &&
97
+ rustup show
98
+ CIBW_BEFORE_BUILD_LINUX: >
99
+ pip install -U setuptools-rust &&
100
+ yum install libatomic -y &&
101
+ curl https://sh.rustup.rs -sSf | sh -s -- --default-toolchain=nightly --profile=minimal -y &&
102
+ rustup show
103
+ CIBW_BEFORE_BUILD_MACOS: >
104
+ pip install -U setuptools-rust &&
105
+ curl https://sh.rustup.rs -sSf | sh -s -- --default-toolchain=nightly --profile=minimal -y &&
106
+ rustup target add x86_64-apple-darwin &&
107
+ rustup show
108
+ - name: Upload wheels
109
+ uses: actions/upload-artifact@v4
110
+ with:
111
+ name: artifact-${{ matrix.build-identifier }}
112
+ path: ./wheelhouse/*.whl
113
+
114
+ publish:
115
+ runs-on: ubuntu-latest
116
+
117
+ needs: build-wheels
118
+ if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/brz-')
119
+ permissions:
120
+ id-token: write
121
+ environment:
122
+ name: pypi
123
+ url: https://pypi.org/p/vcsgraph
124
+ steps:
125
+ - uses: actions/setup-python@v5
126
+
127
+ - name: Install twine
128
+ run: |
129
+ python -m pip install --upgrade pip
130
+ pip install twine
131
+ - name: Download wheels
132
+ uses: actions/download-artifact@v5
133
+ - name: Publish wheels
134
+ env:
135
+ TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
136
+ TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
137
+ run: twine upload artifact/*.whl
@@ -0,0 +1,16 @@
1
+ __pycache__
2
+ *.pyc
3
+ build/
4
+ *~
5
+ /target
6
+ /Cargo.lock
7
+ *.cpython-*.so
8
+ .testrepository/
9
+ *.swp
10
+ *.swo
11
+ *.swn
12
+ .*.swp
13
+ .mypy_cache/
14
+ .claude/settings.local.json
15
+ vcsgraph.egg-info/
16
+ dist/
@@ -0,0 +1,5 @@
1
+ Jelmer Vernooij <jelmer@jelmer.uk> <jelmer@jelmer.uk>
2
+ Jelmer Vernooij <jelmer@jelmer.uk> <jelmer@samba.org>
3
+ Jelmer Vernooij <jelmer@jelmer.uk> <jelmer@canonical.com>
4
+ INADA Naoki <songofacandy@gmail.com> <songofacandy@gmail.com>
5
+ Martin Packman <gzlist@googlemail.com> <martin.packman@canonical.com>
@@ -0,0 +1,23 @@
1
+ *.pyc
2
+ *.pyo
3
+ *~
4
+ # arch can bite me
5
+ {arch}
6
+ .arch-ids
7
+ ,,*
8
+ ++*
9
+ /doc/*.html
10
+ *.tmp
11
+ bzr-test.log
12
+ [#]*#
13
+ .#*
14
+ testrev.*
15
+ /tmp
16
+ # do want this after all
17
+ + CHANGELOG
18
+ /build
19
+ test*.tmp
20
+ .*.swp
21
+ *.orig
22
+ .*.orig
23
+ .bzr-shelf*
@@ -0,0 +1,4 @@
1
+ [DEFAULT]
2
+ test_command=PYTHONPATH=`pwd`:$PYTHONPATH BRZ_PLUGIN_PATH=-site:-user python3 -m breezy selftest --subunit2 $IDOPTION $LISTOPT
3
+ test_id_option=--load-list $IDFILE
4
+ test_list_option=--list
@@ -0,0 +1,76 @@
1
+ # Contributor Covenant Code of Conduct
2
+
3
+ ## Our Pledge
4
+
5
+ In the interest of fostering an open and welcoming environment, we as
6
+ contributors and maintainers pledge to making participation in our project and
7
+ our community a harassment-free experience for everyone, regardless of age, body
8
+ size, disability, ethnicity, sex characteristics, gender identity and expression,
9
+ level of experience, education, socio-economic status, nationality, personal
10
+ appearance, race, religion, or sexual identity and orientation.
11
+
12
+ ## Our Standards
13
+
14
+ Examples of behavior that contributes to creating a positive environment
15
+ include:
16
+
17
+ * Using welcoming and inclusive language
18
+ * Being respectful of differing viewpoints and experiences
19
+ * Gracefully accepting constructive criticism
20
+ * Focusing on what is best for the community
21
+ * Showing empathy towards other community members
22
+
23
+ Examples of unacceptable behavior by participants include:
24
+
25
+ * The use of sexualized language or imagery and unwelcome sexual attention or
26
+ advances
27
+ * Trolling, insulting/derogatory comments, and personal or political attacks
28
+ * Public or private harassment
29
+ * Publishing others' private information, such as a physical or electronic
30
+ address, without explicit permission
31
+ * Other conduct which could reasonably be considered inappropriate in a
32
+ professional setting
33
+
34
+ ## Our Responsibilities
35
+
36
+ Project maintainers are responsible for clarifying the standards of acceptable
37
+ behavior and are expected to take appropriate and fair corrective action in
38
+ response to any instances of unacceptable behavior.
39
+
40
+ Project maintainers have the right and responsibility to remove, edit, or
41
+ reject comments, commits, code, wiki edits, issues, and other contributions
42
+ that are not aligned to this Code of Conduct, or to ban temporarily or
43
+ permanently any contributor for other behaviors that they deem inappropriate,
44
+ threatening, offensive, or harmful.
45
+
46
+ ## Scope
47
+
48
+ This Code of Conduct applies both within project spaces and in public spaces
49
+ when an individual is representing the project or its community. Examples of
50
+ representing a project or community include using an official project e-mail
51
+ address, posting via an official social media account, or acting as an appointed
52
+ representative at an online or offline event. Representation of a project may be
53
+ further defined and clarified by project maintainers.
54
+
55
+ ## Enforcement
56
+
57
+ Instances of abusive, harassing, or otherwise unacceptable behavior may be
58
+ reported by contacting the project team at core@breezy-vcs.org. All
59
+ complaints will be reviewed and investigated and will result in a response that
60
+ is deemed necessary and appropriate to the circumstances. The project team is
61
+ obligated to maintain confidentiality with regard to the reporter of an incident.
62
+ Further details of specific enforcement policies may be posted separately.
63
+
64
+ Project maintainers who do not follow or enforce the Code of Conduct in good
65
+ faith may face temporary or permanent repercussions as determined by other
66
+ members of the project's leadership.
67
+
68
+ ## Attribution
69
+
70
+ This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
71
+ available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
72
+
73
+ [homepage]: https://www.contributor-covenant.org
74
+
75
+ For answers to common questions about this code of conduct, see
76
+ https://www.contributor-covenant.org/faq