Skip to content

Commit eba8336

Browse files
committed
Merge branch 'skel'
2 parents 4b61e59 + 16ea46f commit eba8336

File tree

10 files changed

+175
-3
lines changed

10 files changed

+175
-3
lines changed

.github/workflows/build.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: Build
2+
on:
3+
push:
4+
branches:
5+
- master
6+
tags:
7+
- v*
8+
pull_request:
9+
10+
jobs:
11+
squatter:
12+
runs-on: ${{ matrix.os }}
13+
strategy:
14+
fail-fast: false
15+
matrix:
16+
python-version: [3.6, 3.7, 3.8]
17+
os: [macOS-latest, ubuntu-latest, windows-latest]
18+
19+
steps:
20+
- name: Checkout
21+
uses: actions/checkout@v1
22+
- name: Set Up Python ${{ matrix.python-version }}
23+
uses: actions/setup-python@v1
24+
with:
25+
python-version: ${{ matrix.python-version }}
26+
- name: Install
27+
run: |
28+
python -m pip install --upgrade pip
29+
make setup
30+
pip install -U .
31+
- name: Test
32+
run: make test
33+
- name: Lint
34+
run: make lint
35+
- name: Coverage
36+
run: codecov --token ${{ secrets.CODECOV_TOKEN }} --branch ${{ github.ref }}
37+
continue-on-error: true

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,3 +127,6 @@ dmypy.json
127127

128128
# Pyre type checker
129129
.pyre/
130+
131+
# Visual Studio Code
132+
.vscode/

.vars.ini

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
[vars]
2+
pypi_name = squatter
3+
short_desc = Generates minimal setup.py to register a name on pypi
4+
url = https://github.com/python-packaging/squatter
5+
author = John Reese
6+
author_email = [email protected]
7+
package = squatter
8+
envdir = {envdir}
9+
year = 2020
10+
package_name = Squatter
11+
author_website = https://noswap.com/
12+

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2020 python-packaging
3+
Copyright (c) 2020 John Reese
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

MANIFEST.in

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
include *.md LICENSE
2+
recursive-include squatter *.txt

Makefile

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
PYTHON?=python
2+
SOURCES=squatter setup.py
3+
4+
.PHONY: venv
5+
venv:
6+
$(PYTHON) -m venv .venv
7+
source .venv/bin/activate && make setup
8+
@echo 'run `source .venv/bin/activate` to use virtualenv'
9+
10+
# The rest of these are intended to be run within the venv, where python points
11+
# to whatever was used to set up the venv.
12+
13+
.PHONY: setup
14+
setup:
15+
python -m pip install -Ur requirements-dev.txt
16+
17+
.PHONY: test
18+
test:
19+
python -m coverage run -m squatter.tests $(TESTOPTS)
20+
python -m coverage report
21+
22+
.PHONY: format
23+
format:
24+
python -m isort --recursive -y $(SOURCES)
25+
python -m black $(SOURCES)
26+
27+
.PHONY: lint
28+
lint:
29+
python -m isort --recursive --diff $(SOURCES)
30+
python -m black --check $(SOURCES)
31+
python -m flake8 $(SOURCES)
32+
mypy --strict squatter
33+
34+
.PHONY: release
35+
release:
36+
rm -rf dist
37+
python setup.py sdist bdist_wheel
38+
twine upload dist/*

README.md

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,12 @@
1-
# squatter
2-
You're a bad person if you use this
1+
# Squatter
2+
3+
For those times you need to register a name prior to having the code ready, but
4+
can't be bothered to remember which fields are required.
5+
6+
7+
# License
8+
9+
Squatter is copyright [John Reese](https://noswap.com/), and licensed under
10+
the MIT license. I am providing code in this repository to you under an open
11+
source license. This is my personal repository; the license you receive to
12+
my code is from me and not from my employer. See the `LICENSE` file for details.

requirements-dev.txt

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
black==19.10b0
2+
coverage==4.5.4
3+
flake8==3.7.9
4+
isort==4.3.21
5+
mypy==0.750
6+
tox==3.14.1
7+
twine==3.1.1
8+
volatile==2.1.0
9+
wheel==0.33.6

setup.cfg

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
[metadata]
2+
name = squatter
3+
description = Generates minimal setup.py to register a name on pypi
4+
long_description = file: README.md
5+
long_description_content_type = text/markdown
6+
license = MIT
7+
url = https://github.com/python-packaging/squatter
8+
author = John Reese
9+
author_email = [email protected]
10+
11+
[options]
12+
packages = squatter
13+
setup_requires =
14+
setuptools_scm
15+
setuptools >= 38.3.0
16+
python_requires = >=3.6
17+
18+
[bdist_wheel]
19+
universal = true
20+
21+
[check]
22+
metadata = true
23+
strict = true
24+
25+
[coverage:run]
26+
branch = True
27+
include = squatter/*
28+
omit = squatter/tests/*
29+
30+
[coverage:report]
31+
fail_under = 70
32+
precision = 1
33+
show_missing = True
34+
skip_covered = True
35+
36+
[isort]
37+
line_length = 88
38+
multi_line_output = 3
39+
force_grid_wrap = False
40+
include_trailing_comma = True
41+
use_parentheses = True
42+
43+
[mypy]
44+
ignore_missing_imports = True
45+
46+
[tox:tox]
47+
envlist = py36, py37, py38
48+
49+
[testenv]
50+
deps = -rrequirements-dev.txt
51+
whitelist_externals = make
52+
commands =
53+
make test
54+
setenv =
55+
py{36,37,38}: COVERAGE_FILE={envdir}/.coverage
56+
57+
[flake8]
58+
ignore = E203, E231, E266, E302, E501, W503
59+
max-line-length = 88

setup.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
from setuptools import setup
2+
setup(use_scm_version=True)

0 commit comments

Comments
 (0)