From 5fa4d42e65f22eee8215b1644f1f1e4d6728bc99 Mon Sep 17 00:00:00 2001 From: Gregor Sturm Date: Fri, 14 Apr 2023 10:27:38 +0200 Subject: [PATCH 1/3] template update --- .cruft.json | 42 ++++++++++++++++----------------- .github/workflows/sync.yaml.rej | 7 ++++++ .github/workflows/test.yaml | 27 +++++++-------------- docs/conf.py.rej | 18 ++++++++++++++ pyproject.toml.rej | 11 +++++++++ 5 files changed, 66 insertions(+), 39 deletions(-) create mode 100644 .github/workflows/sync.yaml.rej create mode 100644 docs/conf.py.rej create mode 100644 pyproject.toml.rej diff --git a/.cruft.json b/.cruft.json index 927183f..8da5a75 100644 --- a/.cruft.json +++ b/.cruft.json @@ -1,23 +1,23 @@ { - "template": "https://github.com/scverse/cookiecutter-scverse", - "commit": "57f6267716826dad73baba46dc3c00fe7262c459", - "checkout": "v0.2.0", - "context": { - "cookiecutter": { - "project_name": "scib-metrics", - "package_name": "scib_metrics", - "project_description": "Accelerated and Python-only scIB metrics", - "author_full_name": "Adam Gayoso", - "author_email": "adamgayoso@berkeley.edu", - "github_user": "adamgayoso", - "project_repo": "https://github.com/yoseflab/scib-metrics", - "license": "BSD 3-Clause License", - "_copy_without_render": [ - ".github/workflows/**.yaml", - "docs/_templates/autosummary/**.rst" - ], - "_template": "https://github.com/scverse/cookiecutter-scverse" - } - }, - "directory": null + "template": "https://github.com/scverse/cookiecutter-scverse", + "commit": "c21b82bf134f3a0f13db7482d4fb04ca1f562d59", + "checkout": "main", + "context": { + "cookiecutter": { + "project_name": "scib-metrics", + "package_name": "scib_metrics", + "project_description": "Accelerated and Python-only scIB metrics", + "author_full_name": "Adam Gayoso", + "author_email": "adamgayoso@berkeley.edu", + "github_user": "adamgayoso", + "project_repo": "https://github.com/yoseflab/scib-metrics", + "license": "BSD 3-Clause License", + "_copy_without_render": [ + ".github/workflows/**.yaml", + "docs/_templates/autosummary/**.rst" + ], + "_template": "https://github.com/scverse/cookiecutter-scverse" + } + }, + "directory": null } diff --git a/.github/workflows/sync.yaml.rej b/.github/workflows/sync.yaml.rej new file mode 100644 index 0000000..ee9d744 --- /dev/null +++ b/.github/workflows/sync.yaml.rej @@ -0,0 +1,7 @@ +diff a/.github/workflows/sync.yaml b/.github/workflows/sync.yaml (rejected hunks) +@@ -43,4 +43,4 @@ jobs: + manually merge these changes.** + + For more information about the template sync, please refer to the +- [template documentation](https://cookiecutter-scverse-instance.readthedocs.io/en/latest/developer_docs.html#automated-template-sync). ++ [template documentation](https://cookiecutter-scverse-instance.readthedocs.io/en/latest/template_usage.html#automated-template-sync). diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 2f0ffd7..13267d1 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -6,6 +6,10 @@ on: pull_request: branches: [main] +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + jobs: test: runs-on: ${{ matrix.os }} @@ -24,27 +28,17 @@ jobs: PYTHON: ${{ matrix.python }} steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Set up Python ${{ matrix.python }} - uses: actions/setup-python@v2 + uses: actions/setup-python@v4 with: python-version: ${{ matrix.python }} + cache: "pip" + cache-dependency-path: "**/pyproject.toml" - - name: Get pip cache dir - id: pip-cache-dir - run: | - echo "::set-output name=dir::$(pip cache dir)" - - name: Restore pip cache - uses: actions/cache@v2 - with: - path: ${{ steps.pip-cache-dir.outputs.dir }} - key: pip-${{ runner.os }}-${{ env.pythonLocation }}-${{ hashFiles('**/pyproject.toml') }} - restore-keys: | - pip-${{ runner.os }}-${{ env.pythonLocation }}- - name: Install test dependencies run: | python -m pip install --upgrade pip wheel - pip install codecov - name: Install dependencies run: | pip install ".[dev,test]" @@ -56,7 +50,4 @@ jobs: run: | pytest -v --cov --color=yes - name: Upload coverage - env: - CODECOV_NAME: ${{ matrix.python }}-${{ matrix.os }} - run: | - codecov --required --flags=unittests + uses: codecov/codecov-action@v3 diff --git a/docs/conf.py.rej b/docs/conf.py.rej new file mode 100644 index 0000000..543ce88 --- /dev/null +++ b/docs/conf.py.rej @@ -0,0 +1,18 @@ +diff a/docs/conf.py b/docs/conf.py (rejected hunks) +@@ -16,12 +16,15 @@ sys.path.insert(0, str(HERE / "extensions")) + + # -- Project information ----------------------------------------------------- + ++# NOTE: If you installed your project in editable mode, this might be stale. ++# If this is the case, reinstall it to refresh the metadata + info = metadata("scib-metrics") + project_name = info["Name"] + author = info["Author"] + copyright = f"{datetime.now():%Y}, {author}." + version = info["Version"] +-repository_url = f"https://github.com/adamgayoso/{project_name}" ++urls = dict(pu.split(", ") for pu in info.get_all("Project-URL")) ++repository_url = urls["Source"] + + # The full version, including alpha/beta/rc tags + release = info["Version"] diff --git a/pyproject.toml.rej b/pyproject.toml.rej new file mode 100644 index 0000000..f8d8d34 --- /dev/null +++ b/pyproject.toml.rej @@ -0,0 +1,11 @@ +diff a/pyproject.toml b/pyproject.toml (rejected hunks) +@@ -109,6 +109,9 @@ ignore = [ + "D213", + ] + ++[tool.ruff.pydocstyle] ++convention = "numpy" ++ + [tool.ruff.per-file-ignores] + "docs/*" = ["I"] + "tests/*" = ["D"] From 50cfaf0fd1473ad8af7f929b24c4039891689923 Mon Sep 17 00:00:00 2001 From: Adam Gayoso Date: Fri, 14 Apr 2023 08:46:16 -0700 Subject: [PATCH 2/3] Delete conf.py.rej --- docs/conf.py.rej | 18 ------------------ 1 file changed, 18 deletions(-) delete mode 100644 docs/conf.py.rej diff --git a/docs/conf.py.rej b/docs/conf.py.rej deleted file mode 100644 index 543ce88..0000000 --- a/docs/conf.py.rej +++ /dev/null @@ -1,18 +0,0 @@ -diff a/docs/conf.py b/docs/conf.py (rejected hunks) -@@ -16,12 +16,15 @@ sys.path.insert(0, str(HERE / "extensions")) - - # -- Project information ----------------------------------------------------- - -+# NOTE: If you installed your project in editable mode, this might be stale. -+# If this is the case, reinstall it to refresh the metadata - info = metadata("scib-metrics") - project_name = info["Name"] - author = info["Author"] - copyright = f"{datetime.now():%Y}, {author}." - version = info["Version"] --repository_url = f"https://github.com/adamgayoso/{project_name}" -+urls = dict(pu.split(", ") for pu in info.get_all("Project-URL")) -+repository_url = urls["Source"] - - # The full version, including alpha/beta/rc tags - release = info["Version"] From 8ed8d19f276e3b069076e98ba48e7fcfefc506c4 Mon Sep 17 00:00:00 2001 From: Adam Gayoso Date: Fri, 14 Apr 2023 08:46:30 -0700 Subject: [PATCH 3/3] Delete pyproject.toml.rej --- pyproject.toml.rej | 11 ----------- 1 file changed, 11 deletions(-) delete mode 100644 pyproject.toml.rej diff --git a/pyproject.toml.rej b/pyproject.toml.rej deleted file mode 100644 index f8d8d34..0000000 --- a/pyproject.toml.rej +++ /dev/null @@ -1,11 +0,0 @@ -diff a/pyproject.toml b/pyproject.toml (rejected hunks) -@@ -109,6 +109,9 @@ ignore = [ - "D213", - ] - -+[tool.ruff.pydocstyle] -+convention = "numpy" -+ - [tool.ruff.per-file-ignores] - "docs/*" = ["I"] - "tests/*" = ["D"]