| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -6,11 +6,6 @@ updates: | |||
| 6 | 6 | schedule: | |
| 7 | 7 | interval: weekly | |
| 8 | 8 | ||
| 9 | - - package-ecosystem: gitsubmodule | ||
| 10 | - directory: "/" | ||
| 11 | - schedule: | ||
| 12 | - interval: weekly | ||
| 13 | - | ||
| 14 | 9 | - package-ecosystem: pre-commit | |
| 15 | 10 | directory: "/" | |
| 16 | 11 | schedule: | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -63,17 +63,13 @@ jobs: | |||
| 63 | 63 | - name: Install project and test dependencies | |
| 64 | 64 | run: | | |
| 65 | 65 | . .venv/bin/activate | |
| 66 | - pip install '.[test]' | ||
| 66 | + pip install ./smmap ./gitdb '.[test]' | ||
| 67 | 67 | ||
| 68 | 68 | - name: Show POSIX file ownership | |
| 69 | 69 | run: | | |
| 70 | 70 | ls -ld -- \ | |
| 71 | 71 | "$(pwd)" \ | |
| 72 | 72 | "$(pwd)/.git" \ | |
| 73 | - "$(pwd)/git/ext/gitdb" \ | ||
| 74 | - "$(pwd)/git/ext/gitdb/.git" \ | ||
| 75 | - "$(pwd)/git/ext/gitdb/gitdb/ext/smmap" \ | ||
| 76 | - "$(pwd)/git/ext/gitdb/gitdb/ext/smmap/.git" \ | ||
| 77 | 73 | "${HOME:?HOME is not set}/.gitconfig" \ | |
| 78 | 74 | 2>&1 || true | |
| 79 | 75 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -62,6 +62,10 @@ jobs: | |||
| 62 | 62 | with: | |
| 63 | 63 | languages: ${{ matrix.language }} | |
| 64 | 64 | build-mode: ${{ matrix.build-mode }} | |
| 65 | + config: | | ||
| 66 | + paths-ignore: | ||
| 67 | + - gitdb/gitdb/test/** | ||
| 68 | + - smmap/smmap/test/** | ||
| 65 | 69 | # If you wish to specify custom queries, you can do so here or in a config file. | |
| 66 | 70 | # By default, queries listed here will override any specified in a config file. | |
| 67 | 71 | # Prefix the list here with "+" to use these queries and those in the config file. | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -57,8 +57,6 @@ jobs: | |||
| 57 | 57 | run: | | |
| 58 | 58 | git config --global --add safe.directory "$(pwd)" | |
| 59 | 59 | git config --global --add safe.directory "$(pwd)/.git" | |
| 60 | - git config --global --add safe.directory "$(pwd)/git/ext/gitdb" | ||
| 61 | - git config --global --add safe.directory "$(pwd)/git/ext/gitdb/gitdb/ext/smmap" | ||
| 62 | 60 | git config --global core.autocrlf false | |
| 63 | 61 | ||
| 64 | 62 | - name: Prepare this repo for tests | |
@@ -84,7 +82,7 @@ jobs: | |||
| 84 | 82 | ||
| 85 | 83 | - name: Install project and test dependencies | |
| 86 | 84 | run: | | |
| 87 | - pip install '.[test]' | ||
| 85 | + pip install ./smmap ./gitdb '.[test]' | ||
| 88 | 86 | ||
| 89 | 87 | - name: Show POSIX file ownership | |
| 90 | 88 | # Cygwin's `ls -ld` reports the NTFS Owner SID via Cygwin's SID-to-uid | |
@@ -96,12 +94,6 @@ jobs: | |||
| 96 | 94 | ls -ld -- \ | |
| 97 | 95 | "$(pwd)" \ | |
| 98 | 96 | "$(pwd)/.git" \ | |
| 99 | - "$(pwd)/git/ext/gitdb" \ | ||
| 100 | - "$(pwd)/git/ext/gitdb/.git" \ | ||
| 101 | - "$(pwd)/.git/modules/gitdb" \ | ||
| 102 | - "$(pwd)/git/ext/gitdb/gitdb/ext/smmap" \ | ||
| 103 | - "$(pwd)/git/ext/gitdb/gitdb/ext/smmap/.git" \ | ||
| 104 | - "$(pwd)/.git/modules/gitdb/modules/smmap" \ | ||
| 105 | 97 | "${HOME:?HOME is not set}/.gitconfig" \ | |
| 106 | 98 | 2>&1 || true | |
| 107 | 99 | ||
@@ -114,12 +106,6 @@ jobs: | |||
| 114 | 106 | $paths = @( | |
| 115 | 107 | "$pwd", | |
| 116 | 108 | "$pwd\.git", | |
| 117 | - "$pwd\git\ext\gitdb", | ||
| 118 | - "$pwd\git\ext\gitdb\.git", | ||
| 119 | - "$pwd\.git\modules\gitdb", | ||
| 120 | - "$pwd\git\ext\gitdb\gitdb\ext\smmap", | ||
| 121 | - "$pwd\git\ext\gitdb\gitdb\ext\smmap\.git", | ||
| 122 | - "$pwd\.git\modules\gitdb\modules\smmap", | ||
| 123 | 109 | "$env:USERPROFILE\.gitconfig" | |
| 124 | 110 | ) | |
| 125 | 111 | foreach ($p in $paths) { | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -0,0 +1,42 @@ | |||
| 1 | + name: Dependency packages | ||
| 2 | + | ||
| 3 | + on: | ||
| 4 | + push: | ||
| 5 | + branches: [main] | ||
| 6 | + pull_request: | ||
| 7 | + workflow_dispatch: | ||
| 8 | + | ||
| 9 | + permissions: | ||
| 10 | + contents: read | ||
| 11 | + | ||
| 12 | + jobs: | ||
| 13 | + test: | ||
| 14 | + runs-on: ${{ matrix.python-version == '3.7' && 'ubuntu-22.04' || 'ubuntu-latest' }} | ||
| 15 | + strategy: | ||
| 16 | + fail-fast: false | ||
| 17 | + matrix: | ||
| 18 | + project: [smmap, gitdb] | ||
| 19 | + python-version: ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12", "3.13", "3.13t"] | ||
| 20 | + | ||
| 21 | + steps: | ||
| 22 | + - uses: actions/checkout@v7 | ||
| 23 | + with: | ||
| 24 | + fetch-depth: 0 | ||
| 25 | + - uses: actions/setup-python@v7 | ||
| 26 | + with: | ||
| 27 | + python-version: ${{ matrix.python-version }} | ||
| 28 | + allow-prereleases: true | ||
| 29 | + - name: Install test dependencies | ||
| 30 | + run: | | ||
| 31 | + python -m pip install --upgrade pip | ||
| 32 | + python -m pip install pytest flake8 ./smmap | ||
| 33 | + if test "${{ matrix.project }}" = gitdb; then python -m pip install ./gitdb; fi | ||
| 34 | + - name: Lint | ||
| 35 | + run: flake8 "${{ matrix.project }}/${{ matrix.project }}" --count --select=E9,F63,F7,F82 --show-source --statistics | ||
| 36 | + - name: Test | ||
| 37 | + run: | | ||
| 38 | + if test "${{ matrix.project }}" = gitdb; then | ||
| 39 | + GITDB_TEST_GIT_REPO_BASE="$(git rev-parse --git-common-dir)" pytest -o addopts= -v gitdb/gitdb/test | ||
| 40 | + else | ||
| 41 | + pytest -o addopts= -v smmap/smmap/test | ||
| 42 | + fi | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -95,7 +95,7 @@ jobs: | |||
| 95 | 95 | ||
| 96 | 96 | - name: Install project and test dependencies | |
| 97 | 97 | run: | | |
| 98 | - pip install '.[test]' | ||
| 98 | + pip install ./smmap ./gitdb '.[test]' | ||
| 99 | 99 | ||
| 100 | 100 | - name: Show POSIX file ownership | |
| 101 | 101 | # Linux and macOS only. On Windows, Git Bash's `ls -ld` reports a | |
@@ -107,10 +107,6 @@ jobs: | |||
| 107 | 107 | ls -ld -- \ | |
| 108 | 108 | "$(pwd)" \ | |
| 109 | 109 | "$(pwd)/.git" \ | |
| 110 | - "$(pwd)/git/ext/gitdb" \ | ||
| 111 | - "$(pwd)/git/ext/gitdb/.git" \ | ||
| 112 | - "$(pwd)/git/ext/gitdb/gitdb/ext/smmap" \ | ||
| 113 | - "$(pwd)/git/ext/gitdb/gitdb/ext/smmap/.git" \ | ||
| 114 | 110 | "${HOME:?HOME is not set}/.gitconfig" \ | |
| 115 | 111 | 2>&1 || true | |
| 116 | 112 | ||
@@ -124,10 +120,6 @@ jobs: | |||
| 124 | 120 | $paths = @( | |
| 125 | 121 | "$pwd", | |
| 126 | 122 | "$pwd\.git", | |
| 127 | - "$pwd\git\ext\gitdb", | ||
| 128 | - "$pwd\git\ext\gitdb\.git", | ||
| 129 | - "$pwd\git\ext\gitdb\gitdb\ext\smmap", | ||
| 130 | - "$pwd\git\ext\gitdb\gitdb\ext\smmap\.git", | ||
| 131 | 123 | "$env:USERPROFILE\.gitconfig" | |
| 132 | 124 | ) | |
| 133 | 125 | foreach ($p in $paths) { | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,3 +1,5 @@ | |||
| 1 | + exclude: ^(?:gitdb|smmap)/ | ||
| 2 | + | ||
| 1 | 3 | repos: | |
| 2 | 4 | - repo: https://github.com/codespell-project/codespell | |
| 3 | 5 | rev: v2.4.2 | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -101,15 +101,13 @@ In the less common case that you do not want to install test dependencies, `pip | |||
| 101 | 101 | ||
| 102 | 102 | #### With editable *dependencies* (not preferred, and rarely needed) | |
| 103 | 103 | ||
| 104 | - In rare cases, you may want to work on GitPython and one or both of its [gitdb](https://github.com/gitpython-developers/gitdb) and [smmap](https://github.com/gitpython-developers/smmap) dependencies at the same time, with changes in your local working copy of gitdb or smmap immediately reflected in the behavior of your local working copy of GitPython. This can be done by making editable installations of those dependencies in the same virtual environment where you install GitPython. | ||
| 105 | - | ||
| 106 | - If you want to do that *and* you want the versions in GitPython's git submodules to be used, then pass `-e git/ext/gitdb` and/or `-e git/ext/gitdb/gitdb/ext/smmap` to `pip install`. This can be done in any order, and in separate `pip install` commands or the same one, so long as `-e` appears before *each* path. For example, you can install GitPython, gitdb, and smmap editably in the currently active virtual environment this way: | ||
| 104 | + GitPython, [gitdb](gitdb), and [smmap](smmap) live in this repository as independently packaged projects. To work on all three at once, install each one editably in the same virtual environment: | ||
| 107 | 105 | ||
| 108 | 106 | ```sh | |
| 109 | - pip install -e ".[test]" -e git/ext/gitdb -e git/ext/gitdb/gitdb/ext/smmap | ||
| 107 | + pip install -e smmap -e gitdb -e ".[test]" | ||
| 110 | 108 | ``` | |
| 111 | 109 | ||
| 112 | - The submodules must have been cloned for that to work, but that will already be the case if you have run `./init-tests-after-clone.sh`. You can use `pip list` to check which packages are installed editably and which are installed normally. | ||
| 110 | + You can use `pip list` to check which packages are installed editably and which are installed normally. | ||
| 113 | 111 | ||
| 114 | 112 | To reiterate, this approach should only rarely be used. For most development it is preferable to allow the gitdb and smmap dependencices to be retrieved automatically from PyPI in their latest stable packaged versions. | |
| 115 | 113 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -97,11 +97,6 @@ and cloned using:: | |||
| 97 | 97 | ||
| 98 | 98 | $ git clone https://github.com/gitpython-developers/GitPython git-python | |
| 99 | 99 | ||
| 100 | - Initialize all submodules to obtain the required dependencies with:: | ||
| 101 | - | ||
| 102 | - $ cd git-python | ||
| 103 | - $ git submodule update --init --recursive | ||
| 104 | - | ||
| 105 | 100 | Finally verify the installation by running unit tests:: | |
| 106 | 101 | ||
| 107 | 102 | $ python -m unittest | |
| Back | FazBrowse Home | New Git URL |
0 commit comments