Skip to content

Commit e20ca46

Browse files
committed
Initial commit
0 parents  commit e20ca46

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

83 files changed

+10251
-0
lines changed

.bazelrc

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
common --incompatible_disallow_empty_glob
2+
common --noenable_bzlmod
3+
4+
common --experimental_profile_additional_tasks=fetch
5+
common --experimental_profile_additional_tasks=critical_path
6+
common --experimental_profile_additional_tasks=critical_path_component
7+
8+
# Recommended for hermetic testing.
9+
build --action_env=PYTHONNOUSERSITE=1
10+
build --test_env=PYTHONNOUSERSITE=1
11+
build --incompatible_default_to_explicit_init_py
12+
build --cxxopt=-std=c++17
13+
test --test_output=errors
14+
15+
coverage --strategy=CoverageReport=local
16+
coverage --build_runfile_links
17+
coverage --combined_report=lcov
18+
coverage --instrumentation_filter=^//
19+
coverage --instrument_test_targets

.gitattributes

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
*.BUILD linguist-language=starlark

.github/.golangci.yml

+63
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
# This file contains configuration values to use in the github action.
2+
# For local development you may or may not want somewhat different
3+
# options.
4+
5+
# options for analysis running
6+
run:
7+
tests: true
8+
modules-download-mode: readonly
9+
allow-parallel-runners: true
10+
11+
output:
12+
13+
# print lines of code with issue, default is true
14+
print-issued-lines: true
15+
16+
# print linter name in the end of issue text, default is true
17+
print-linter-name: true
18+
19+
# make issues output unique by line, default is true
20+
uniq-by-line: true
21+
22+
# all available settings of specific linters
23+
linters-settings:
24+
errcheck:
25+
check-type-assertions: false
26+
check-blank: false
27+
exclude-functions:
28+
- io.Copy(*bytes.Buffer)
29+
- io.Copy(os.Stderr)
30+
- (bytes.Buffer).Write
31+
- (bytes.Buffer).WriteByte
32+
- (bytes.Buffer).WriteRune
33+
- (bytes.Buffer).WriteString
34+
- fmt.Fprintln(os.Stderr)
35+
36+
gofmt:
37+
# simplify code: gofmt with `-s` option
38+
simplify: true
39+
40+
lll:
41+
line-length: 100
42+
tab-width: 4
43+
misspell:
44+
locale: US
45+
46+
linters:
47+
enable:
48+
- bodyclose
49+
- godot
50+
- gofmt
51+
- govet
52+
- ineffassign
53+
- lll
54+
- mirror
55+
- misspell
56+
- prealloc
57+
- tenv
58+
- tparallel
59+
- unconvert
60+
- unparam
61+
- unused
62+
- usestdlibvars
63+
- whitespace

.github/dependabot.yml

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
version: 2
2+
3+
updates:
4+
- package-ecosystem: gomod
5+
directory: "/"
6+
schedule:
7+
# These updates are mainly informational.
8+
# Updating go.mod does (almost) nothing; it's the bazel dependencies
9+
# which matter.
10+
interval: monthly
11+
open-pull-requests-limit: 10
12+
- package-ecosystem: "github-actions"
13+
directory: "/"
14+
schedule:
15+
interval: weekly

.github/pull_request_template.md

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<!---
2+
Please create an issue and discuss the issue which is promting your change
3+
before opening a pull request.
4+
5+
In general, we're not going to accept pull requests for new features if they
6+
would be a significant breaking change, if they have the potential to
7+
significantly impact build performance, or if they introduce
8+
new dependencies for the repository.
9+
10+
Please note, this is a fork of an internal repository.
11+
Pull requests may be rejected simply because pulling the change into our
12+
internal repository would be too complicated.
13+
--->

.github/workflows/deps.yml

+49
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: Update Dependencies
2+
on:
3+
schedule:
4+
- cron: 0 0 * * 1
5+
workflow_dispatch:
6+
7+
permissions:
8+
contents: write
9+
pull-requests: write
10+
11+
jobs:
12+
update-conda:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v4
16+
- uses: actions/setup-go@v5
17+
with:
18+
go-version: "1.22"
19+
- name: Generate conda package lock
20+
run: >
21+
bazel run
22+
--show_progress_rate_limit=5
23+
//:generate_package_lock
24+
- name: Create Pull Request
25+
uses: peter-evans/create-pull-request@v7
26+
id: make_pr
27+
with:
28+
commit-message: >
29+
build(deps): update conda dependencies
30+
title: >
31+
build(deps): update conda dependencies
32+
author: GitHub Action <[email protected]>
33+
# Note: using `GITHUB_TOKEN` here means that the PR won't
34+
# trigger any workflows.
35+
token: ${{secrets.GITHUB_TOKEN}}
36+
body: |
37+
Auto-generated by generate_package_lock.
38+
branch: dependabot/conda/update-conda-dependencies/${{ github.ref_name }}
39+
delete-branch: true
40+
labels: |
41+
dependencies
42+
- name: Enable auto-merge
43+
run: gh pr merge --auto --squash "$PR_URL"
44+
if: ${{
45+
steps.make_pr.outputs.pull-request-url &&
46+
steps.make_pr.outputs.pull-request-operation == 'created' }}
47+
env:
48+
PR_URL: ${{steps.make_pr.outputs.pull-request-url}}
49+
GH_TOKEN: ${{secrets.GITHUB_TOKEN}}

.github/workflows/golangci-lint.yml

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: golangci-lint
2+
on:
3+
pull_request:
4+
5+
6+
permissions:
7+
contents: read
8+
# Required for only-new-issues
9+
pull-requests: read
10+
11+
jobs:
12+
golangci:
13+
name: lint
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@v4
17+
- uses: actions/setup-go@v5
18+
with:
19+
go-version: ">=1.22"
20+
- name: golangci-lint
21+
uses: golangci/golangci-lint-action@v6
22+
with:
23+
version: v1.61
24+
only-new-issues: true

.github/workflows/test.yml

+35
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: Test
2+
3+
on:
4+
pull_request:
5+
push:
6+
branches:
7+
- main
8+
9+
permissions:
10+
contents: read
11+
12+
jobs:
13+
test:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- name: Checkout git repository
17+
uses: actions/checkout@v4
18+
- uses: actions/setup-go@v5
19+
with:
20+
go-version: "1.22"
21+
- name: Configure bazel PATH
22+
run: echo "common --repo_env=PATH=$PATH" >> ~/.bazelrc
23+
- name: Get bazel info
24+
run: |
25+
echo "bazel_bin=$(bazel info bazel-bin)" >> $GITHUB_ENV
26+
- name: Cache bazel external repository build
27+
uses: actions/cache@v4
28+
with:
29+
path: |
30+
${{ env.bazel_bin }}/external
31+
key: bazel-build-cache-${{hashFiles('deps.bzl', 'WORKSPACE')}}
32+
restore-keys: |
33+
bazel-build-cache-
34+
- name: Run tests
35+
run: bazel test --color=yes //...

.gitignore

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
bin/
2+
*.pyc
3+
*.pyo
4+
/bazel-*
5+
*.swp
6+
.vscode/
7+
8+
# We're not yet ready for bzlmod; in the mean time this annoys generate_build
9+
# if building with bzlmod enabled.
10+
/MODULE.bazel
11+
/MODULE.bazel.lock

BUILD.bazel

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
load("@bazel_skylib//:bzl_library.bzl", "bzl_library")
2+
3+
package(
4+
default_visibility = ["//visibility:public"],
5+
)
6+
7+
# gazelle:prefix github.com/10XGenomics/rules_conda
8+
9+
exports_files(
10+
[
11+
"LICENSE",
12+
"pyproject.toml",
13+
],
14+
visibility = ["//:__subpackages__"],
15+
)
16+
17+
# Alias to surface the conda package lock generation at the root.
18+
alias(
19+
name = "generate_package_lock",
20+
actual = "//third-party/conda:generate_package_lock",
21+
)

LICENSE

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
The MIT License (MIT)
2+
3+
Copyright (c) 2019-2024 10x Genomics, Inc.
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in
13+
all copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21+
THE SOFTWARE.

0 commit comments

Comments
 (0)