Skip to content

Commit d6665a9

Browse files
committed
Initialize skel
rev: 86bc977
0 parents  commit d6665a9

File tree

13 files changed

+346
-0
lines changed

13 files changed

+346
-0
lines changed

.github/workflows/build.yml

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
name: Build
2+
on:
3+
push:
4+
branches:
5+
- master
6+
- main
7+
- tmp-*
8+
tags:
9+
- v*
10+
pull_request:
11+
12+
jobs:
13+
metadata_please-just-tests:
14+
runs-on: ${{ matrix.os }}
15+
strategy:
16+
fail-fast: false
17+
matrix:
18+
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12", "3.13"]
19+
os: [macOS-latest, ubuntu-latest, windows-latest]
20+
21+
steps:
22+
- name: Checkout
23+
uses: actions/checkout@v4
24+
- name: Set Up Python ${{ matrix.python-version }}
25+
uses: actions/setup-python@v5
26+
with:
27+
python-version: ${{ matrix.python-version }}
28+
allow-prereleases: true
29+
- name: Install
30+
run: |
31+
python -m pip install --upgrade pip
32+
make setup
33+
pip install -U .
34+
- name: Test
35+
run: make test
36+
- name: Lint
37+
run: make lint
38+
39+
metadata_please:
40+
runs-on: ${{ matrix.os }}
41+
strategy:
42+
fail-fast: false
43+
matrix:
44+
python-version: ["3.10", "3.11", "3.12"]
45+
os: [macOS-latest, ubuntu-latest, windows-latest]
46+
47+
steps:
48+
- name: Checkout
49+
uses: actions/checkout@v4
50+
- name: Set Up Python ${{ matrix.python-version }}
51+
uses: actions/setup-python@v5
52+
with:
53+
python-version: ${{ matrix.python-version }}
54+
- name: Install
55+
run: |
56+
python -m pip install --upgrade pip
57+
make setup
58+
pip install -U .
59+
- name: Test
60+
run: make test
61+
- name: Lint
62+
run: make lint

.gitignore

Lines changed: 107 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,107 @@
1+
# Byte-compiled / optimized / DLL files
2+
__pycache__/
3+
*.py[cod]
4+
*$py.class
5+
6+
# C extensions
7+
*.so
8+
9+
# Distribution / packaging
10+
.Python
11+
build/
12+
develop-eggs/
13+
dist/
14+
downloads/
15+
eggs/
16+
.eggs/
17+
lib/
18+
lib64/
19+
parts/
20+
sdist/
21+
var/
22+
wheels/
23+
*.egg-info/
24+
.installed.cfg
25+
*.egg
26+
MANIFEST
27+
28+
# PyInstaller
29+
# Usually these files are written by a python script from a template
30+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
31+
*.manifest
32+
*.spec
33+
34+
# Installer logs
35+
pip-log.txt
36+
pip-delete-this-directory.txt
37+
38+
# Unit test / coverage reports
39+
htmlcov/
40+
.tox/
41+
.coverage
42+
.coverage.*
43+
.cache
44+
nosetests.xml
45+
coverage.xml
46+
*.cover
47+
.hypothesis/
48+
.pytest_cache/
49+
50+
# Translations
51+
*.mo
52+
*.pot
53+
54+
# Django stuff:
55+
*.log
56+
local_settings.py
57+
db.sqlite3
58+
59+
# Flask stuff:
60+
instance/
61+
.webassets-cache
62+
63+
# Scrapy stuff:
64+
.scrapy
65+
66+
# Sphinx documentation
67+
docs/_build/
68+
69+
# PyBuilder
70+
target/
71+
72+
# Jupyter Notebook
73+
.ipynb_checkpoints
74+
75+
# pyenv
76+
.python-version
77+
78+
# celery beat schedule file
79+
celerybeat-schedule
80+
81+
# SageMath parsed files
82+
*.sage.py
83+
84+
# Environments
85+
.env
86+
.venv*
87+
env/
88+
venv/
89+
ENV/
90+
env.bak/
91+
venv.bak/
92+
93+
# Spyder project settings
94+
.spyderproject
95+
.spyproject
96+
97+
# Rope project settings
98+
.ropeproject
99+
100+
# mkdocs documentation
101+
/site
102+
103+
# mypy
104+
.mypy_cache/
105+
106+
# Visual Studio Code
107+
.vscode/

.vars.ini

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
[vars]
2+
year = 2024
3+
author = Tim Hatch
4+
package = metadata_please
5+
pypi_name = metadata-please
6+
short_desc = Simple extractor for python artifact metadata
7+
url = https://github.com/python-packaging/metadata-please/
8+
author_email = [email protected]
9+
package_name = metadata_please
10+
author_website = https://timhatch.com/
11+

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2024 Tim Hatch
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

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 metadata_please *.txt

Makefile

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
PYTHON?=python
2+
SOURCES=metadata_please 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 -Ue .[dev,test]
16+
17+
.PHONY: test
18+
test:
19+
python -m coverage run -m metadata_please.tests $(TESTOPTS)
20+
python -m coverage report
21+
22+
.PHONY: format
23+
format:
24+
python -m ufmt format $(SOURCES)
25+
26+
.PHONY: lint
27+
lint:
28+
python -m ufmt check $(SOURCES)
29+
python -m flake8 $(SOURCES)
30+
python -m checkdeps --allow-names metadata_please metadata_please
31+
mypy --strict --install-types --non-interactive metadata_please
32+
33+
.PHONY: release
34+
release:
35+
rm -rf dist
36+
python setup.py sdist bdist_wheel
37+
twine upload dist/*

README.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# metadata_please
2+
3+
4+
# Version Compat
5+
6+
Usage of this library should work back to 3.7, but development (and mypy
7+
compatibility) only on 3.10-3.12. Linting requires 3.12 for full fidelity.
8+
9+
# License
10+
11+
metadata_please is copyright [Tim Hatch](https://timhatch.com/), and licensed under
12+
the MIT license. I am providing code in this repository to you under an open
13+
source license. This is my personal repository; the license you receive to
14+
my code is from me and not from my employer. See the `LICENSE` file for details.

metadata_please/__init__.py

Whitespace-only changes.

metadata_please/py.typed

Whitespace-only changes.

metadata_please/tests/__init__.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# from .foo import FooTest
2+
3+
__all__ = [
4+
# "FooTest",
5+
]

metadata_please/tests/__main__.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
import unittest
2+
3+
if __name__ == "__main__":
4+
unittest.main(module="metadata_please.tests", verbosity=2)

setup.cfg

Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
[metadata]
2+
name = metadata-please
3+
description = Simple extractor for python artifact metadata
4+
long_description = file: README.md
5+
long_description_content_type = text/markdown
6+
license = MIT
7+
url = https://github.com/python-packaging/metadata-please/
8+
author = Tim Hatch
9+
author_email = [email protected]
10+
11+
[options]
12+
packages = find:
13+
python_requires = >=3.7
14+
setup_requires =
15+
setuptools_scm < 8; python_version<'3.8'
16+
setuptools_scm >= 8; python_version>='3.8'
17+
setuptools >= 65
18+
include_package_data = true
19+
install_requires =
20+
21+
[options.extras_require]
22+
dev =
23+
black == 23.12.1
24+
checkdeps == 0.9.0
25+
flake8 == 7.0.0
26+
mypy == 1.8.0
27+
tox == 4.12.1
28+
twine == 4.0.2
29+
ufmt == 2.3.0
30+
usort == 1.0.7
31+
wheel == 0.42.0
32+
test =
33+
coverage >= 6
34+
35+
[options.entry_points]
36+
# console_scripts =
37+
# foo=foo:bar
38+
39+
[check]
40+
metadata = true
41+
strict = true
42+
43+
[coverage:run]
44+
branch = True
45+
include = metadata_please/*
46+
omit = metadata_please/tests/*
47+
48+
[coverage:report]
49+
fail_under = 70
50+
precision = 1
51+
show_missing = True
52+
skip_covered = True
53+
54+
[mypy]
55+
ignore_missing_imports = True
56+
57+
[tox:tox]
58+
envlist = py{37,38,39,310,311,312}, coverage
59+
60+
[testenv]
61+
deps = .[test]
62+
allowlist_externals = make
63+
commands =
64+
make test
65+
setenv =
66+
COVERAGE_FILE={toxworkdir}/.coverage.{envname}
67+
68+
[testenv:coverage]
69+
deps = coverage
70+
setenv =
71+
COVERAGE_FILE={toxworkdir}/.coverage
72+
commands =
73+
coverage combine
74+
coverage report
75+
depends =
76+
py{37,38,39,310,311,312}
77+
78+
[flake8]
79+
ignore = E203, E231, E266, E302, E501, W503
80+
max-line-length = 88

setup.py

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

0 commit comments

Comments
 (0)