Skip to content
This repository has been archived by the owner on Oct 12, 2023. It is now read-only.

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
KOLANICH committed Oct 12, 2023
0 parents commit 36785f6
Show file tree
Hide file tree
Showing 22 changed files with 2,038 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .ci/aptPackagesToInstall.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
python3-lz4
python3-msgpack
python3-brotli
python3-cbor
python3-ujson
3 changes: 3 additions & 0 deletions .ci/pythonPackagesToInstallFromGit.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
https://github.com/KOLANICH/transformerz.py.git
https://github.com/indygreg/python-zstandard.git
https://github.com/jnwatson/py-lmdb.git
12 changes: 12 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
root = true

[*]
charset = utf-8
indent_style = tab
indent_size = 4
insert_final_newline = true
end_of_line = lf

[*.{yml,yaml}]
indent_style = space
indent_size = 2
1 change: 1 addition & 0 deletions .github/.templateMarker
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
KOLANICH/python_project_boilerplate.py
8 changes: 8 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
version: 2
updates:
- package-ecosystem: "pip"
directory: "/"
schedule:
interval: "daily"
allow:
- dependency-type: "all"
15 changes: 15 additions & 0 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: CI
on:
push:
branches: [master]
pull_request:
branches: [master]

jobs:
build:
runs-on: ubuntu-22.04
steps:
- name: typical python workflow
uses: KOLANICH-GHActions/typical-python-workflow@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
12 changes: 12 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
__pycache__
*.pyc
*.pyo
*.egg-info
build
dist
.eggs
monkeytype.sqlite3
/tests/**.sqlite
/tests/databasesFiles
/tests/**.mdb
/tests/**.mdb-lock
53 changes: 53 additions & 0 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
#image: pypy:latest
image: registry.gitlab.com/kolanich-subgroups/docker-images/fixed_python:latest

variables:
DOCKER_DRIVER: overlay2
SAST_ANALYZER_IMAGE_TAG: latest
SAST_DISABLE_DIND: "true"
SAST_CONFIDENCE_LEVEL: 5
CODECLIMATE_VERSION: latest

include:
- template: SAST.gitlab-ci.yml
- template: Code-Quality.gitlab-ci.yml
- template: License-Management.gitlab-ci.yml

build:
tags:
- shared
- linux
stage: build
variables:
GIT_DEPTH: "1"
PYTHONUSERBASE: ${CI_PROJECT_DIR}/python_user_packages

before_script:
- export PATH="$PATH:$PYTHONUSERBASE/bin" # don't move into `variables`
- apt-get update
- apt-get -y install python3-lz4 python3-msgpack python3-brotli python3-cbor python3-ujson
- pip3 install --upgrade https://gitlab.com/KOLANICH/py-lmdb/-/jobs/artifacts/gitlab/raw/wheels/lmdb-0.CI_cpython_latest-py3-none-any.whl?job=build
- python3 ./fix_python_modules_paths.py
- mkdir -p ./tests/databasesFiles
- mount -t ramfs ramfs ./tests/databasesFiles

script:
- python3 setup.py bdist_wheel
- mv ./dist/*.whl ./dist/Cache-0.CI-py3-none-any.whl
- pip3 install --upgrade -e ./[msgpack,lz4,brotli,zopflipy,cbor,zstd,lmdb]
- coverage run --source=Cache -m pytest --junitxml=./rspec.xml ./tests/test.py
- coverage report -m
- coverage xml

coverage: /^TOTAL(?:\s+\d+){4}\s+(\d+%).+/

cache:
paths:
- $PYTHONUSERBASE

artifacts:
paths:
- dist
reports:
junit: ./rspec.xml
cobertura: ./coverage.xml
21 changes: 21 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
os:
- linux
- osx
dist: trusty
language: python
python:
- 3.4
- 3.5
- 3.6
- 3.7
- nightly
- pypy3
- pypy3-nightly
before_install:
- pip3 install --upgrade setuptools setuptools_scm coveralls
install:
- python setup.py install
script:
- coverage run --source=Cache python tests/test.py test
after_success:
- coveralls
Loading

0 comments on commit 36785f6

Please sign in to comment.