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 6383520
Show file tree
Hide file tree
Showing 10 changed files with 351 additions and 68 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: "Build and Tests"

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

jobs:
pytest:
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: "3.12"

- name: Install
run: |
python -m pip install --upgrade pip
python -m pip install ".[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
6 changes: 2 additions & 4 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,9 @@ def finalize_options(self):

install_requires = [
"attrs",
"cattrs<=1.10.0",
"multidict>=4.5,<5.0",
"cattrs<=22.1.0",
"structlog>=20.1.0",
"toml>=0.10",
"tomlkit>=0.5.3",
"typing_inspect>=0.4.0",
"cached_property",
"uritools",
Expand Down Expand Up @@ -69,7 +67,7 @@ def finalize_options(self):
"long_description_content_type": "text/x-rst",
"author": "Oliver Berger",
"author_email": "[email protected]",
"url": "https://gitlab.com/diefans/buvar",
"url": "https://github.com/diefans/buvar",
"package_dir": {"": "src"},
"packages": find_packages("src"),
"include_package_data": True,
Expand Down
Loading

0 comments on commit 6383520

Please sign in to comment.