Skip to content

Commit

Permalink
fix: remov loop from event
Browse files Browse the repository at this point in the history
also updated some deps
  • Loading branch information
diefans committed May 13, 2024
1 parent 50931fb commit 7f61916
Show file tree
Hide file tree
Showing 10 changed files with 357 additions and 68 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: "Build and Tests"

on:
push:
branches:
- "*"
# tag is already build in branch
tags-ignore:
- "*"
pull_request:
branches: ["master"]

jobs:
pytest:
strategy:
fail-fast: false
matrix:
version: ["3.12", "3.11", "3.10", "3.9", "3.8", "3.7"]

name: Testing ${{ matrix.version }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "{{ matrix.version }}"

- name: Install
run: |
python -m pip install --upgrade pip
python -m pip install -e ".[tests]"
- name: Run tests
run: |
pytest
11 changes: 11 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,14 @@ c_di.c
c_di.*.so
c_components.c
c_components.*.so
c_context.c
c_context.*.so
# Devenv
.devenv*
devenv.local.nix

# direnv
.direnv

# pre-commit
.pre-commit-config.yaml
7 changes: 6 additions & 1 deletion build_manylinux.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,22 @@
set -e -x

# defaults
: ${PLATFORM:=manylinux1_x86_64}
: ${PLATFORM:=manylinux2014_x86_64}
: ${PROJECT:=buvar}
: ${PYTHON_VERSIONS:=$(cat <<EOF
cp37-cp37m
cp38-cp38
cp39-cp39
cp310-cp310
cp311-cp311
cp312-cp312
EOF
)}


# create wheels
for PYTHON_VERSION in ${PYTHON_VERSIONS}; do
echo "Building for ${PYTHON_VERSION}"
BIN=/opt/python/${PYTHON_VERSION}/bin
PIP=${BIN}/pip
PYTHON=${BIN}/python
Expand Down
227 changes: 227 additions & 0 deletions devenv.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,227 @@
{
"nodes": {
"devenv": {
"locked": {
"dir": "src/modules",
"lastModified": 1715593316,
"owner": "cachix",
"repo": "devenv",
"rev": "725c90407ef53cc2a1b53701c6d2d0745cf2484f",
"treeHash": "7ac06cbb236d43b776abbb0a7b8c48c9175d6012",
"type": "github"
},
"original": {
"dir": "src/modules",
"owner": "cachix",
"repo": "devenv",
"type": "github"
}
},
"flake-compat": {
"flake": false,
"locked": {
"lastModified": 1696426674,
"owner": "edolstra",
"repo": "flake-compat",
"rev": "0f9255e01c2351cc7d116c072cb317785dd33b33",
"treeHash": "2addb7b71a20a25ea74feeaf5c2f6a6b30898ecb",
"type": "github"
},
"original": {
"owner": "edolstra",
"repo": "flake-compat",
"type": "github"
}
},
"flake-compat_2": {
"flake": false,
"locked": {
"lastModified": 1696426674,
"owner": "edolstra",
"repo": "flake-compat",
"rev": "0f9255e01c2351cc7d116c072cb317785dd33b33",
"treeHash": "2addb7b71a20a25ea74feeaf5c2f6a6b30898ecb",
"type": "github"
},
"original": {
"owner": "edolstra",
"repo": "flake-compat",
"type": "github"
}
},
"flake-utils": {
"inputs": {
"systems": "systems"
},
"locked": {
"lastModified": 1710146030,
"owner": "numtide",
"repo": "flake-utils",
"rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a",
"treeHash": "bd263f021e345cb4a39d80c126ab650bebc3c10c",
"type": "github"
},
"original": {
"id": "flake-utils",
"type": "indirect"
}
},
"flake-utils_2": {
"inputs": {
"systems": "systems_2"
},
"locked": {
"lastModified": 1710146030,
"owner": "numtide",
"repo": "flake-utils",
"rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a",
"treeHash": "bd263f021e345cb4a39d80c126ab650bebc3c10c",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"gitignore": {
"inputs": {
"nixpkgs": [
"pre-commit-hooks",
"nixpkgs"
]
},
"locked": {
"lastModified": 1709087332,
"owner": "hercules-ci",
"repo": "gitignore.nix",
"rev": "637db329424fd7e46cf4185293b9cc8c88c95394",
"treeHash": "ca14199cabdfe1a06a7b1654c76ed49100a689f9",
"type": "github"
},
"original": {
"owner": "hercules-ci",
"repo": "gitignore.nix",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1713361204,
"owner": "cachix",
"repo": "devenv-nixpkgs",
"rev": "285676e87ad9f0ca23d8714a6ab61e7e027020c6",
"treeHash": "50354b35a3e0277d4a83a0a88fa0b0866b5f392f",
"type": "github"
},
"original": {
"owner": "cachix",
"ref": "rolling",
"repo": "devenv-nixpkgs",
"type": "github"
}
},
"nixpkgs-python": {
"inputs": {
"flake-compat": "flake-compat",
"flake-utils": "flake-utils",
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1713539989,
"owner": "cachix",
"repo": "nixpkgs-python",
"rev": "462946481a3f4497c90103c92b5e7408e3c59f4f",
"treeHash": "40324a2ba4241b8c4218bac5fc72e73460fd5821",
"type": "github"
},
"original": {
"owner": "cachix",
"repo": "nixpkgs-python",
"type": "github"
}
},
"nixpkgs-stable": {
"locked": {
"lastModified": 1715395895,
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "71bae31b7dbc335528ca7e96f479ec93462323ff",
"treeHash": "b8ae138025f110a8e468a9fe095084da6fd07c91",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-23.11",
"repo": "nixpkgs",
"type": "github"
}
},
"pre-commit-hooks": {
"inputs": {
"flake-compat": "flake-compat_2",
"flake-utils": "flake-utils_2",
"gitignore": "gitignore",
"nixpkgs": [
"nixpkgs"
],
"nixpkgs-stable": "nixpkgs-stable"
},
"locked": {
"lastModified": 1715609711,
"owner": "cachix",
"repo": "pre-commit-hooks.nix",
"rev": "c182c876690380f8d3b9557c4609472ebfa1b141",
"treeHash": "8ca3c0abe85c95ba7e8eef91a8c6a34f6dde5299",
"type": "github"
},
"original": {
"owner": "cachix",
"repo": "pre-commit-hooks.nix",
"type": "github"
}
},
"root": {
"inputs": {
"devenv": "devenv",
"nixpkgs": "nixpkgs",
"nixpkgs-python": "nixpkgs-python",
"pre-commit-hooks": "pre-commit-hooks"
}
},
"systems": {
"locked": {
"lastModified": 1681028828,
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"treeHash": "cce81f2a0f0743b2eb61bc2eb6c7adbe2f2c6beb",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
},
"systems_2": {
"locked": {
"lastModified": 1681028828,
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"treeHash": "cce81f2a0f0743b2eb61bc2eb6c7adbe2f2c6beb",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
}
},
"root": "root",
"version": 7
}
66 changes: 66 additions & 0 deletions devenv.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
{ pkgs, lib, config, inputs, ... }:

{
# https://devenv.sh/basics/
env.GREET = "devenv";

# https://devenv.sh/packages/
packages = [
pkgs.git
# pkgs.nodejs
# pkgs.nodePackages.npm
pkgs.pyright
pkgs.ruff
# XXX uses python 3.11 and wrong cattrs
# pkgs.ruff-lsp
# pkgs.nodePackages.cdk8s-cli
];

# https://devenv.sh/scripts/
scripts.hello.exec = "echo hello from $GREET";

enterShell = ''
hello
git --version
uv pip install -e ".[tests]"
uv pip install pdbpp
# this is too late
# cat requirements-dev.txt > reqs.txt
# cat requirements.txt >> reqs.txt
'';

# https://devenv.sh/tests/
enterTest = ''
echo "Running tests"
'';

# https://devenv.sh/services/
# services.postgres.enable = true;

# https://devenv.sh/languages/
languages.python = {
enable = true;
version = "3.12.3";
uv.enable = true;
venv = {
enable = true;
# requirements = ./requirements.txt;
};
};
# languages.javascript = {
# enable = true; # adds node LTS & npm
# corepack.enable = true;
# npm.install.enable = true;
# # package = pkgs.nodejs-18_x; # <- if you need to override npm version
# };

# https://devenv.sh/pre-commit-hooks/
# pre-commit.hooks.shellcheck.enable = true;

# https://devenv.sh/processes/
# processes.ping.exec = "ping example.com";

# See full reference at https://devenv.sh/reference/options/
}
3 changes: 3 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@ services:
environment:
PLATFORM: manylinux2014_x86_64
PYTHON_VERSIONS: |
cp312-cp312
cp311-cp311
cp310-cp310
cp39-cp39
cp38-cp38
cp37-cp37m
Expand Down
Loading

0 comments on commit 7f61916

Please sign in to comment.