Skip to content

Commit

Permalink
Merge branch 'main' into interpolate-lexer
Browse files Browse the repository at this point in the history
  • Loading branch information
max-sixty committed Mar 6, 2024
2 parents ba6d469 + a09d0b8 commit bce69f9
Show file tree
Hide file tree
Showing 429 changed files with 8,929 additions and 5,813 deletions.
34 changes: 25 additions & 9 deletions .config/.markdown-link-check-all.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,4 @@
{
"httpHeaders": [
{
"headers": {
"Accept": "text/html"
},
"urls": ["https://crates.io"]
}
],
"ignorePatterns": [
{
"pattern": "^https://twitter.com"
Expand All @@ -16,6 +8,30 @@
},
{
"pattern": "^https://www.php.net"
},
{
"pattern": "^https://github.com.*container",
"_comment": "`https://github.com/PRQL/prql/pkgs/container/` seems to fail extremely frequently from CI, more so than other GitHub links. So ignoring."
}
],
"httpHeaders": [
{
"headers": {
"Accept": "text/html"
},
"urls": ["https://crates.io"]
},
{
"_comment": "https://github.com/tcort/markdown-link-check/issues/109#issuecomment-1212575985",
"urls": [""],
"headers": {
"Accept-Encoding": "zstd;q=1, br;q=0.9, gzip;q=0.8, deflate;q=0.7, compress;q=0.6, *;q=0.1, identity;q=0"
}
}
]
],
"_comment": "These four attempt to reduce CI failures; but low confidence on whether they're optimal",
"timeout": "20s",
"retryOn429": true,
"retryCount": 5,
"fallbackRetryDelay": "30s"
}
26 changes: 25 additions & 1 deletion .config/.markdown-link-check-local.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,30 @@
"_comment_2": "If some third-party website breaks a link, we cover that in ./.markdown-link-check-all.json",
"_comment_3": "So this excludes anything that's not a relative link to a file in our repo or a link to our file on the web.",
"pattern": "^(?!https://github\\.com/(PRQL|prql)|https://prql-lang\\.org|https://raw\\.githubusercontent\\.com/(PRQL|prql)|[./]+|file://).*$"
},
{
"_comment": "`https://github.com/PRQL/prql/pkgs/container/` seems to fail extremely frequently from CI, more so than other GitHub links. So ignoring.",
"pattern": "^https://github.com/PRQL/prql/pkgs/container"
}
],
"httpHeaders": [
{
"headers": {
"Accept": "text/html"
},
"urls": ["https://crates.io"]
},
{
"_comment": "https://github.com/tcort/markdown-link-check/issues/109#issuecomment-1212575985",
"urls": [""],
"headers": {
"Accept-Encoding": "zstd;q=1, br;q=0.9, gzip;q=0.8, deflate;q=0.7, compress;q=0.6, *;q=0.1, identity;q=0"
}
}
]
],
"_comment": "These four attempt to reduce CI failures; but low confidence on whether they're optimal",
"timeout": "20s",
"retryOn429": true,
"retryCount": 5,
"fallbackRetryDelay": "30s"
}
4 changes: 2 additions & 2 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
// Dev Container for Rust, website, prql-js and prql-python
// Dev Container for Rust, website, prql-js and prqlc-python
{
"image": "ghcr.io/prql/prql-devcontainer-base:latest",
"features": {
"ghcr.io/devcontainers/features/hugo:1": {},
"ghcr.io/devcontainers/features/python:1": {},
"ghcr.io/devcontainers/features/node:1": {},
"ghcr.io/eitsupi/devcontainer-features/go-task:1": {},
"ghcr.io/eitsupi/devcontainer-features/jq-likes:1": {
"ghcr.io/eitsupi/devcontainer-features/jq-likes:2": {
"yqVersion": "latest",
},
"ghcr.io/eitsupi/devcontainer-features/duckdb-cli:1": {},
Expand Down
139 changes: 14 additions & 125 deletions .github/CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -1,132 +1,21 @@
# Contributor Covenant Code of Conduct
# Code of Conduct

## Our Pledge
We prefer keeping our rules as short as possible and filling the gaps with the
mortar of human interaction: empathy.

We as members, contributors, and leaders pledge to make participation in our
community a harassment-free experience for everyone, regardless of age, body
size, visible or invisible disability, ethnicity, sex characteristics, gender
identity and expression, level of experience, education, socio-economic status,
nationality, personal appearance, race, caste, color, religion, or sexual
identity and orientation.
All we ask of members of this project is this:

We pledge to act and interact in ways that contribute to an open, welcoming,
diverse, inclusive, and healthy community.
- Please treat each other with respect and understanding.
- Please respect our wish to not serve as a stage for disputes about fairness or
personal differences.

## Our Standards
If you can agree to these conditions, your contributions are welcome. If you can
not, please don’t spoil it for the rest of us.

Examples of behavior that contributes to a positive environment for our
community include:
To report a violation of these rules, please email
[[email protected]](mailto:[email protected]) or contact one of the
[project maintainers](https://github.com/orgs/PRQL/people).

- Demonstrating empathy and kindness toward other people
- Being respectful of differing opinions, viewpoints, and experiences
- Giving and gracefully accepting constructive feedback
- Accepting responsibility and apologizing to those affected by our mistakes,
and learning from the experience
- Focusing on what is best not just for us as individuals, but for the overall
community
---

Examples of unacceptable behavior include:

- The use of sexualized language or imagery, and sexual attention or advances of
any kind
- Trolling, insulting or derogatory comments, and personal or political attacks
- Public or private harassment
- Publishing others' private information, such as a physical or email address,
without their explicit permission
- Other conduct which could reasonably be considered inappropriate in a
professional setting

## Enforcement Responsibilities

Community leaders are responsible for clarifying and enforcing our standards of
acceptable behavior and will take appropriate and fair corrective action in
response to any behavior that they deem inappropriate, threatening, offensive,
or harmful.

Community leaders have the right and responsibility to remove, edit, or reject
comments, commits, code, wiki edits, issues, and other contributions that are
not aligned to this Code of Conduct, and will communicate reasons for moderation
decisions when appropriate.

## Scope

This Code of Conduct applies within all community spaces, and also applies when
an individual is officially representing the community in public spaces.
Examples of representing our community include using an official e-mail address,
posting via an official social media account, or acting as an appointed
representative at an online or offline event.

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported to the community leaders responsible for enforcement at prql GitHub
organization or associated Discord server. All complaints will be reviewed and
investigated promptly and fairly.

All community leaders are obligated to respect the privacy and security of the
reporter of any incident.

## Enforcement Guidelines

Community leaders will follow these Community Impact Guidelines in determining
the consequences for any action they deem in violation of this Code of Conduct:

### 1. Correction

**Community Impact**: Use of inappropriate language or other behavior deemed
unprofessional or unwelcome in the community.

**Consequence**: A private, written warning from community leaders, providing
clarity around the nature of the violation and an explanation of why the
behavior was inappropriate. A public apology may be requested.

### 2. Warning

**Community Impact**: A violation through a single incident or series of
actions.

**Consequence**: A warning with consequences for continued behavior. No
interaction with the people involved, including unsolicited interaction with
those enforcing the Code of Conduct, for a specified period of time. This
includes avoiding interactions in community spaces as well as external channels
like social media. Violating these terms may lead to a temporary or permanent
ban.

### 3. Temporary Ban

**Community Impact**: A serious violation of community standards, including
sustained inappropriate behavior.

**Consequence**: A temporary ban from any sort of interaction or public
communication with the community for a specified period of time. No public or
private interaction with the people involved, including unsolicited interaction
with those enforcing the Code of Conduct, is allowed during this period.
Violating these terms may lead to a permanent ban.

### 4. Permanent Ban

**Community Impact**: Demonstrating a pattern of violation of community
standards, including sustained inappropriate behavior, harassment of an
individual, or aggression toward or disparagement of classes of individuals.

**Consequence**: A permanent ban from any sort of public interaction within the
community.

## Attribution

This Code of Conduct is adapted from the [Contributor Covenant][homepage],
version 2.1, available at
[https://www.contributor-covenant.org/version/2/1/code_of_conduct.html][v2.1].

Community Impact Guidelines were inspired by [Mozilla's code of conduct
enforcement ladder][mozilla coc].

For answers to common questions about this code of conduct, see the FAQ at
[https://www.contributor-covenant.org/faq][faq]. Translations are available at
[https://www.contributor-covenant.org/translations][translations].

[homepage]: https://www.contributor-covenant.org
[v2.1]: https://www.contributor-covenant.org/version/2/1/code_of_conduct.html
[mozilla coc]: https://github.com/mozilla/diversity
[faq]: https://www.contributor-covenant.org/faq
[translations]: https://www.contributor-covenant.org/translations
(based on <https://jan-krueger.net/mincoc/>)
10 changes: 5 additions & 5 deletions .github/actions/build-prqlc/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,7 @@ runs:
- if: runner.os == 'Windows' && inputs.profile == 'release'
shell: bash
run: |
echo 'RUSTFLAGS=-Ctarget-feature=+crt-static' >>"$GITHUB_ENV"
run: echo 'RUSTFLAGS=-Ctarget-feature=+crt-static' >>"$GITHUB_ENV"

- if: inputs.target == 'aarch64-unknown-linux-musl'
shell: bash
Expand Down Expand Up @@ -78,9 +77,10 @@ runs:
run: |
export ARTIFACT_NAME="prqlc-v${{ github.ref_type == 'tag' && github.ref_name || 0 }}-${{ matrix.target }}.tar.gz"
echo "ARTIFACT_NAME=${ARTIFACT_NAME}" >>"$GITHUB_ENV"
cd target/${{ matrix.target }}/${{ inputs.profile == 'release' && 'release' || 'debug' }}
cp ../../../prqlc/prqlc/README.md .
tar czf "../../../${ARTIFACT_NAME}" prqlc ../../../LICENSE README.md
TEMP_DIR=$(mktemp -d)
cp prqlc/prqlc/README.md LICENSE "${TEMP_DIR}/"
cp -r target/${{ matrix.target }}/${{ inputs.profile == 'release' && 'release' || 'debug' }}/prqlc "${TEMP_DIR}/"
tar czf "${ARTIFACT_NAME}" -C "$TEMP_DIR" .
- name: Create artifact for Windows
shell: bash
Expand Down
Original file line number Diff line number Diff line change
@@ -1,42 +1,53 @@
name: build-wheel
description:
"Use maturin to build python dists of prql-python. Conditional `if` checks
ensure only the correct OS build is called."
description: "Use maturin to build python dists."
inputs:
target:
description: Build target, or 'source' for source distribution
required: false
package:
description: Package name
required: true

runs:
using: composite
steps:
- id: package-path
run:
echo "package_path=$(cargo metadata --no-deps --format-version 1 | jq -r
--arg package_name ${{ inputs.package }} '.packages[] | select(.name ==
$package_name) | .manifest_path')" >>"$GITHUB_OUTPUT"
shell: bash
# There's benefit from caching here, because the maturin action uses a container.
- uses: PyO3/maturin-action@v1
if: inputs.target == 'source'
with:
command: sdist
args: -o target/python -m prqlc/bindings/python/Cargo.toml
args: -o target/python -m ${{steps.package-path.outputs.package_path}}
- uses: PyO3/maturin-action@v1
if: runner.os == 'Linux' && inputs.target != 'source'
with:
target: ${{ inputs.target }}
manylinux: auto
command: build
args: --release -o target/python -m prqlc/bindings/python/Cargo.toml
args:
--release -o target/python -m
${{steps.package-path.outputs.package_path}}
- uses: PyO3/maturin-action@v1
if: runner.os == 'Windows' && inputs.target != 'source'
with:
command: build
args: --release -o target/python -m prqlc/bindings/python/Cargo.toml
args:
--release -o target/python -m
${{steps.package-path.outputs.package_path}}
- uses: PyO3/maturin-action@v1
if: runner.os == 'macOS' && inputs.target != 'source'
with:
command: build
args:
--release -o target/python --target universal2-apple-darwin -m
prqlc/bindings/python/Cargo.toml
${{steps.package-path.outputs.package_path}}
- name: Upload wheels
uses: actions/upload-artifact@v3
with:
name: wheels
name: ${{ inputs.package }}-wheels
path: target/python
9 changes: 7 additions & 2 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ updates:
commit-message:
prefix: "chore: "

- directory: ".github/actions/build-prql-python"
- directory: ".github/actions/build-python"
commit-message:
prefix: "chore: "
package-ecosystem: "github-actions"
Expand All @@ -72,7 +72,7 @@ updates:
interval: "daily"

- package-ecosystem: pip
directory: "prqlc/bindings/python"
directory: "prqlc/bindings/prqlc-python"
schedule:
interval: daily
commit-message:
Expand All @@ -81,3 +81,8 @@ updates:
- dependency-name: "*"
update-types:
- version-update:semver-patch

- package-ecosystem: "devcontainers"
directory: "/"
schedule:
interval: daily
10 changes: 5 additions & 5 deletions .github/workflows/build-web.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,17 +27,17 @@ jobs:
- name: Setup Hugo
uses: peaceiris/[email protected]

- uses: baptiste0928/cargo-install@v2
- uses: baptiste0928/cargo-install@v3
with:
crate: mdbook
- uses: baptiste0928/cargo-install@v2
- uses: baptiste0928/cargo-install@v3
with:
crate: mdbook-footnote
- uses: baptiste0928/cargo-install@v2
- uses: baptiste0928/cargo-install@v3
with:
crate: mdbook-admonish

- uses: baptiste0928/cargo-install@v2
- uses: baptiste0928/cargo-install@v3
with:
crate: wasm-pack

Expand All @@ -59,7 +59,7 @@ jobs:
${{ github.ref == 'refs/heads/web' || github.ref ==
'refs/heads/main' }}

- uses: arduino/setup-task@v1
- uses: arduino/setup-task@v2
with:
repo-token: "${{ secrets.GITHUB_TOKEN }}"

Expand Down

0 comments on commit bce69f9

Please sign in to comment.