Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
2f774ba
JavaScript: remove date time polyfill
rsyring Aug 1, 2025
d413b25
Fix imports when openpyxl isn't present
rsyring Aug 1, 2025
4a3d9f3
Rendering: fix paging_select() input display
rsyring Aug 1, 2025
ff982a2
Dev tooling / setup
rsyring Aug 2, 2025
93b5265
Apply Coppy template
rsyring Aug 2, 2025
4e03a08
Move modules to ./src
rsyring Aug 2, 2025
0721b9d
Remove legacy files
rsyring Aug 2, 2025
2e2df7b
pyproject.toml updates
rsyring Aug 2, 2025
f9bf8bf
nox tests
rsyring Aug 2, 2025
1407596
Ruff: bulk safe fixes and formatting
rsyring Aug 2, 2025
22f6232
Ruff manual and "unsafe" fixes
rsyring Aug 2, 2025
fa7a797
pre-commit linting
rsyring Aug 3, 2025
d185424
Move tests and related from ./src to ./tests
rsyring Aug 3, 2025
ff12c45
pyproject.toml formatting and nox adjustments
rsyring Aug 3, 2025
7fc8cbe
nox: add session to verify translations; adjust related config
rsyring Aug 3, 2025
876dbdb
pyproject.toml refactor
rsyring Aug 3, 2025
f2ab757
noxfile refactor
rsyring Aug 3, 2025
16a51af
nox: build docs
rsyring Aug 3, 2025
bc80fdc
resolve translation issues
guruofgentoo Aug 4, 2025
f883c32
nox: use separate session for mssql tests
rsyring Aug 3, 2025
0e5534d
nox refactoring; remove tox & related
rsyring Aug 3, 2025
e55d369
pre-commit lint of translation files
rsyring Aug 4, 2025
45f606d
gh nox action
rsyring Aug 4, 2025
8df7859
Remove pre-commit-uv from CI
rsyring Aug 6, 2025
f7de663
Alternate fix for nox pre-commit
rsyring Aug 6, 2025
150d930
Fully remove uv-nox
rsyring Aug 6, 2025
fbd2329
nox: fix wheel session with new hatch environment
rsyring Aug 6, 2025
ccec7a1
GH CI: use internal actions to DRY the config
rsyring Aug 6, 2025
d1db290
GH CI: use internal actions to DRY the config
rsyring Aug 6, 2025
816fba6
Add coverage support
rsyring Aug 6, 2025
70ab5c0
Remove circleci
rsyring Aug 6, 2025
0ae0ca2
Readme: convert to markdown
rsyring Aug 6, 2025
682d273
gh action for pypi publish
rsyring Aug 6, 2025
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
Empty file removed .ci/.gitkeep
Empty file.
Empty file removed .ci/test-reports/.gitignore
Empty file.
72 changes: 0 additions & 72 deletions .circleci/config.yml

This file was deleted.

19 changes: 19 additions & 0 deletions .copier-answers-py.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Changes here will be overwritten by Copier
#
# Updating `_src` could be helpful, see notes at:
# https://github.com/level12/coppy/wiki#creating-a-project
#
# Otherwise, NEVER EDIT MANUALLY
_commit: v1.20250622.1
_src_path: gh:level12/coppy
author_email: devteam@level12.io
author_name: Level 12
gh_org: level12
gh_repo: webgrid
hatch_version_tag_sign: true
project_name: WebGrid
py_module: webgrid
python_version: '3.10'
script_name: ''
use_circleci: false
use_gh_nox: true
12 changes: 11 additions & 1 deletion .coveragerc
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
# .coveragerc to control coverage.py
[run]
branch = True
source = webgrid
omit =
src/webgrid/version.py

source =
src/webgrid
tests/webgrid_tests


[html]
directory = tmp/coverage-html
38 changes: 38 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# This is the "top-most" .editorconfig for this project.
# Like a `.gitignore` file, you can place additional
# .editorconfig files in specific directories, if you need
# local settings. However, this directive specifies that
# no "global" settings will be used (settings from higher-
# up in the directory hierarchy, wherever that may be)
root = true

# Set the default whitespace settings for all files
[*]

# Use UNIX-style line endings
end_of_line = lf

# 4-space indents
indent_size = 4
indent_style = space

# end all files with a newline
insert_final_newline = true

# trim whitespace from the ends of lines
trim_trailing_whitespace = true


[*.py]
# ensure Python source files are utf-8
charset = utf-8


[*.{yml,yaml}]
# Set two-space indents for YAML files
indent_size = 2


[Makefile]
# Makefiles *must* use tabs!
indent_style = tab
30 changes: 30 additions & 0 deletions .github/actions/nox-run/action.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: "Nox Run"

inputs:
nox-session:
description: "Name of the nox session to execute"
required: true

runs:
using: composite
steps:
- uses: ./.github/actions/uv-setup

# MSSQL sessions need ODBC driver in the runner
- name: Install MS ODBC driver (Ubuntu)
if: contains(inputs.nox-session, 'pytest_mssql')
run: tasks/odbc-driver-install
shell: bash

- name: Run nox session
run: uv run --only-group nox -- nox -s "${{ inputs.nox-session }}"
env:
UV_LINK_MODE: copy
shell: bash

- name: upload coverage artifact
if: contains(inputs.nox-session, 'pytest')
uses: actions/upload-artifact@v4
with:
name: coverage-${{ inputs.nox-session }}
path: ci/coverage/${{ inputs.nox-session }}.xml
14 changes: 14 additions & 0 deletions .github/actions/uv-setup/action.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: "uv setup"
description: "Install Python & uv"

runs:
using: composite
steps:
# NOTE: use GH's action to install Python b/c mise docs say it will be faster due to caching
- name: "Set up Python"
uses: actions/setup-python@v5
with:
python-version-file: "pyproject.toml"

- name: Install uv
uses: astral-sh/setup-uv@v6
142 changes: 142 additions & 0 deletions .github/workflows/nox.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,142 @@
name: Nox

on:
push:
branches:
- main
tags:
- 'v*.*.*'
pull_request:
workflow_dispatch:

# Limit this workflow to a single run at a time per-branch to avoid wasting worker resources
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true


jobs:
generate-matrix:
runs-on: ubuntu-24.04

outputs:
nox-sessions: ${{ steps.nox-sessions.outputs.sessions }}

steps:
- name: Checkout
uses: actions/checkout@v4

# - uses: ./.github/actions/uv-setup

# - id: nox-sessions
# run: |
# sessions=$(uv run --only-group nox -- tasks/gh-nox-sessions)
# echo "sessions=$sessions" >> $GITHUB_OUTPUT
# env:
# PYTHONPATH: './src'

# nox-other:
# needs: generate-matrix
# runs-on: ubuntu-24.04

# strategy:
# fail-fast: false
# matrix:
# session: ${{ fromJson(needs.generate-matrix.outputs.nox-sessions).other }}

# steps:
# - name: Checkout
# uses: actions/checkout@v4

# - uses: ./.github/actions/nox-run
# with:
# nox-session: ${{ matrix.session }}


nox-pg:
needs: generate-matrix
runs-on: ubuntu-24.04

strategy:
fail-fast: false
matrix:
session: ${{ fromJson(needs.generate-matrix.outputs.nox-sessions).pg }}

services:
postgres:
image: postgres:17
env:
POSTGRES_HOST_AUTH_METHOD: trust
ports:
- 5432:5432
options: >-
--health-cmd="pg_isready -U postgres"
--health-interval=3s
--health-timeout=3s
--health-retries=15

steps:
- name: Checkout
uses: actions/checkout@v4

- uses: ./.github/actions/nox-run
with:
nox-session: ${{ matrix.session }}


# nox-mssql:
# needs: generate-matrix
# runs-on: ubuntu-24.04

# strategy:
# fail-fast: false
# matrix:
# session: ${{ fromJson(needs.generate-matrix.outputs.nox-sessions).mssql }}

# services:
# mssql:
# image: mcr.microsoft.com/mssql/server:2019-latest
# env:
# ACCEPT_EULA: Y
# SA_PASSWORD: Docker-sa-password
# ports:
# - 1433:1433
# options: >-
# --health-cmd="/opt/mssql-tools18/bin/sqlcmd -C -S localhost -U SA -P Docker-sa-password -Q \"select 'ok'\""
# --health-interval=3s
# --health-timeout=3s
# --health-retries=15

# steps:
# - name: Checkout
# uses: actions/checkout@v4

# - uses: ./.github/actions/nox-run
# with:
# nox-session: ${{ matrix.session }}


# codecov:
# needs: [nox-other, nox-pg, nox-mssql]
# runs-on: ubuntu-latest

# permissions:
# id-token: write # For codecov OIDC

# steps:
# # Codecov action says we have to have done a checkout
# - name: Checkout
# uses: actions/checkout@v4

# - uses: actions/download-artifact@v5
# with:
# path: ci/github-coverage
# merge-multiple: true

# - name: Coverage files
# run: ls -R ci/

# - uses: codecov/codecov-action@v5
# with:
# use_oidc: true
# files: ci/github-coverage/*.xml
45 changes: 45 additions & 0 deletions .github/workflows/pypi.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: PyPI publish

on:
workflow_run:
workflows:
- Nox
types:
- completed

# Limit this workflow to a single run at a time per-branch to avoid wasting worker resources
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true


jobs:
build:
name: Build project then publish to pypi
runs-on: ubuntu-latest

# Only run when the nox run is a success and we have a version tag
if: github.event.workflow_run.conclusion == 'success'

env:
PYPI_URL: ${{ github.event_name == 'pull_request' && 'https://test.pypi.org/legacy/' || 'https://upload.pypi.org/legacy/' }}

permissions:
# required for pypa/gh-action-pypi-publish
id-token: write

steps:
- name: Checkout
uses: actions/checkout@v4

- uses: ./.github/actions/uv-setup

- name: Hatch build
run: |
uv run --only-group release -- hatch --version
uv run --only-group release -- hatch build

- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
packages-dir: tmp/dist
Loading