Thanks to visit codestin.com
Credit goes to github.com

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
30 changes: 30 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Test
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
build:
runs-on: '${{ matrix.os }}'
strategy:
matrix:
os:
- ubuntu-latest
python-version:
- '3.8'
- '3.9'
- '3.10'
- '3.11'
steps:
- name: 'Set up Python ${{ matrix.python-version }}'
uses: actions/setup-python@v2
with:
python-version: '${{ matrix.python-version }}'
- uses: actions/checkout@v2
- run: pip install pytest-cov codecov
- run: pip install -r requirements-dev.txt
- run: pytest --cov=./vyper
- run: codecov
28 changes: 20 additions & 8 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,21 @@
repos:
- repo: local
hooks:
- id: black
name: black
stages: [commit]
language: system
entry: venv/bin/black -t py37 --exclude venv .
types: [python]
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: mixed-line-ending
args: ['--fix=lf']
description: Forces to replace line ending by the UNIX 'lf' character.
- repo: https://github.com/psf/black
rev: 23.9.1
hooks:
- id: black
language_version: python3
- repo: https://github.com/d-ryzhykau/pipenv-lock-pre-commit
rev: 0.5.0
hooks:
- id: pipenv-lock
- id: pipenv-verify
- id: pipenv-requirements
- id: pipenv-requirements-dev
19 changes: 0 additions & 19 deletions .travis.yml

This file was deleted.

43 changes: 13 additions & 30 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,41 +1,24 @@
.PHONY: help dev clean update test lint

VENV_NAME?=venv
VENV_ACTIVATE=. $(VENV_NAME)/bin/activate
PYTHON=${VENV_NAME}/bin/python3
.PHONY: help dev test lint pre-commit

.DEFAULT: help
help:
@echo "make dev"
@echo " prepare development environment, use only once"
@echo "make clean"
@echo " delete development environment"
@echo "make update"
@echo " update dependencies"
@echo " prepare development environment"
@echo "make test"
@echo " run tests"
@echo " run tests"
@echo "make lint"
@echo " run black"
@echo " run black"
@echo "make pre-commit"
@echo " run pre-commit hooks"

dev:
make venv

venv: $(VENV_NAME)/bin/activate
$(VENV_NAME)/bin/activate:
test -d $(VENV_NAME) || virtualenv -p python3 $(VENV_NAME)
${PYTHON} -m pip install -U pip
${PYTHON} -m pip install -r dev_requirements.txt
$(VENV_NAME)/bin/pre-commit install
touch $(VENV_NAME)/bin/activate

clean:
rm -rf venv
pipenv install --dev

update:
${PYTHON} -m pip install -r dev_requirements.txt
test:
pipenv run pytest

test: venv
${PYTHON} -m pytest
lint:
pipenv run black .

lint: venv
$(VENV_NAME)/bin/black -t py37 --exclude $(VENV_NAME) .
pre-commit:
pipenv run pre-commit
9 changes: 9 additions & 0 deletions Pipfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
[[source]]
url = "https://pypi.org/simple"
verify_ssl = true
name = "pypi"

[dev-packages]
black = "==23.9.1"
pre-commit = "==3.4.0"
pytest = "==7.4.2"
233 changes: 233 additions & 0 deletions Pipfile.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# xid [![Build Status](https://travis-ci.com/alexferl/xid.svg?branch=master)](https://travis-ci.com/alexferl/xid) [![codecov](https://codecov.io/gh/alexferl/xid/branch/master/graph/badge.svg)](https://codecov.io/gh/alexferl/xid)
# xid [![codecov](https://codecov.io/gh/alexferl/xid/branch/master/graph/badge.svg)](https://codecov.io/gh/alexferl/xid)

A Python 3.7+ port of [https://github.com/rs/xid](https://github.com/rs/xid).
A Python 3.8+ port of [https://github.com/rs/xid](https://github.com/rs/xid).

# Install

Expand Down
1 change: 1 addition & 0 deletions VERSION
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
1.0.0
3 changes: 0 additions & 3 deletions dev_requirements.txt

This file was deleted.

3 changes: 3 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[build-system]
requires = ["setuptools"]
build-backend = "setuptools.build_meta"
Loading