Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,10 @@
"remoteUser": "vscode",
"features": {
"ghcr.io/devcontainers/features/node:1": {},
"ghcr.io/devcontainers-contrib/features/poetry:2": {},
"ghcr.io/eitsupi/devcontainer-features/jq-likes:2": {
"jqVersion": "latest",
"yqVersion": "latest"
}
},
"ghcr.io/jsburckhardt/devcontainer-features/uv:1": {}
}
}
10 changes: 3 additions & 7 deletions .github/actions/setup-env/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,11 @@ inputs:
runs:
using: composite
steps:
- name: Setup Poetry
shell: bash
run: pipx install poetry

- name: Setup Python
uses: actions/setup-python@v5
- name: Setup Python and uv
uses: astral-sh/setup-uv@v5
with:
python-version: ${{ inputs.python-version }}
cache: poetry
enable-cache: true

- name: Setup Node
uses: actions/setup-node@v4
Expand Down
10 changes: 8 additions & 2 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,22 @@
version: 2
enable-beta-ecosystems: true
Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

uv was just added recently; dependabot/dependabot-core#11687

updates:
- package-ecosystem: "devcontainers"
directory: "/"
schedule:
interval: "monthly"

- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "monthly"

- package-ecosystem: "pip"
- package-ecosystem: "npm"
directory: "/"
schedule:
interval: "monthly"

- package-ecosystem: "devcontainers"
- package-ecosystem: "uv"
directory: "/"
schedule:
interval: "monthly"
22 changes: 11 additions & 11 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,21 +21,21 @@ jobs:
matrix:
include:
- name: mypy
command: poetry run mypy .
- name: Poetry
command: poetry check
command: uv run mypy .
- name: Prettier
command: prettier --check .
command: npm run prettier -- --check .
- name: Pylint
command: poetry run pylint src tests
command: uv run pylint src tests
- name: Ruff linter
command: poetry run ruff check --output-format=github .
command: uv run ruff check --output-format=github .
- name: Ruff formatter
command: poetry run ruff format --check .
command: uv run ruff format --check .
- name: ShellCheck
command: poetry run shellcheck scripts/*.sh
command: uv run shellcheck scripts/*.sh
- name: uv lock
command: uv lock --check
- name: YamlLint
command: poetry run yamllint --format github .
command: uv run yamllint --format github .
runs-on: ubuntu-latest
name: ${{ matrix.name }}
steps:
Expand Down Expand Up @@ -69,10 +69,10 @@ jobs:
node-version: ${{ env.DEFAULT_NODE }}

- name: Run tests
run: poetry run pytest
run: uv run pytest

- name: Make coverage XML report
run: poetry run coverage xml
run: uv run coverage xml

- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v5
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,10 @@ jobs:
run: |
version="${{ github.ref_name }}"
version=${version#v}
poetry version ${{ github.ref_name }}
uvx --from=toml-cli toml set --toml-path=pyproject.toml project.version "$version"
Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

uv has no function to set the project version, so it needs to be updated in pyproject.toml manually.


- name: Build project
run: poetry build
run: uv build

- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ permissions:
jobs:
update_dependecies:
runs-on: ubuntu-latest
name: Update dependecies with Poetry
name: Update dependecies
steps:
- name: Check out code from GitHub
uses: actions/checkout@v4
Expand All @@ -34,13 +34,13 @@ jobs:
python-version: ${{ env.DEFAULT_PYTHON }}
node-version: ${{ env.DEFAULT_NODE }}

- name: Run Poetry update and create PR body
- name: Update dependecies and create PR body
run: |
# Capture the output of `poetry update` and process it.
poetry update | tee /tmp/pr_body.md
# Capture the output of the update command.
uv lock --upgrade 2>&1 | tee /tmp/pr_body.md

# Remove the first two lines and the last line, and save back to the same file.
sed -i '1,2d;$d' /tmp/pr_body.md
# Remove the first line.
sed -i '1d' /tmp/pr_body.md

# Prepend the title to the file.
sed -i '1i# Dependency Updates' /tmp/pr_body.md
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/update_fixtures.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ jobs:
- name: Update fixtures script
env:
TOMTOM_API_KEY: ${{ secrets.TOMTOM_API_KEY }}
run: poetry run python scripts/update_test_fixtures.py
run: uv run scripts/update_test_fixtures.py

- name: Create pull request
if: github.event.inputs.create_pr == 'true'
Expand All @@ -63,7 +63,7 @@ jobs:
automated pr

- name: Run tests
run: poetry run pytest
run: uv run pytest

- name: Upload fixtures for failed test
if: failure()
Expand Down
149 changes: 143 additions & 6 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,147 @@
.tmp/

# Created by https://www.toptal.com/developers/gitignore/api/python,osx
# Edit at https://www.toptal.com/developers/gitignore?templates=python,osx
# Created by https://www.toptal.com/developers/gitignore/api/osx,python,node
# Edit at https://www.toptal.com/developers/gitignore?templates=osx,python,node

### Node ###
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
lerna-debug.log*
.pnpm-debug.log*

# Diagnostic reports (https://nodejs.org/api/report.html)
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json

# Runtime data
pids
*.pid
*.seed
*.pid.lock

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage
*.lcov

# nyc test coverage
.nyc_output

# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# Bower dependency directory (https://bower.io/)
bower_components

# node-waf configuration
.lock-wscript

# Compiled binary addons (https://nodejs.org/api/addons.html)
build/Release

# Dependency directories
node_modules/
jspm_packages/

# Snowpack dependency directory (https://snowpack.dev/)
web_modules/

# TypeScript cache
*.tsbuildinfo

# Optional npm cache directory
.npm

# Optional eslint cache
.eslintcache

# Optional stylelint cache
.stylelintcache

# Microbundle cache
.rpt2_cache/
.rts2_cache_cjs/
.rts2_cache_es/
.rts2_cache_umd/

# Optional REPL history
.node_repl_history

# Output of 'npm pack'
*.tgz

# Yarn Integrity file
.yarn-integrity

# dotenv environment variable files
.env
.env.development.local
.env.test.local
.env.production.local
.env.local

# parcel-bundler cache (https://parceljs.org/)
.cache
.parcel-cache

# Next.js build output
.next
out

# Nuxt.js build / generate output
.nuxt
dist

# Gatsby files
.cache/
# Comment in the public line in if your project uses Gatsby and not Next.js
# https://nextjs.org/blog/next-9-1#public-directory-support
# public

# vuepress build output
.vuepress/dist

# vuepress v2.x temp and cache directory
.temp

# Docusaurus cache and generated files
.docusaurus

# Serverless directories
.serverless/

# FuseBox cache
.fusebox/

# DynamoDB Local files
.dynamodb/

# TernJS port file
.tern-port

# Stores VSCode versions used for testing VSCode extensions
.vscode-test

# yarn v2
.yarn/cache
.yarn/unplugged
.yarn/build-state.yml
.yarn/install-state.gz
.pnp.*

### Node Patch ###
# Serverless Webpack directories
.webpack/

# Optional stylelint cache

# SvelteKit build / generate output
.svelte-kit

### OSX ###
# General
Expand Down Expand Up @@ -77,7 +217,6 @@ htmlcov/
.nox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
Expand All @@ -91,7 +230,6 @@ cover/
*.pot

# Django stuff:
*.log
local_settings.py
db.sqlite3
db.sqlite3-journal
Expand Down Expand Up @@ -155,7 +293,6 @@ celerybeat.pid
*.sage.py

# Environments
.env
.venv
env/
venv/
Expand Down Expand Up @@ -204,4 +341,4 @@ poetry.toml
# LSP config files
pyrightconfig.json

# End of https://www.toptal.com/developers/gitignore/api/python,osx
# End of https://www.toptal.com/developers/gitignore/api/osx,python,node
Loading