Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Turn zope.meta into a real installable Python package #282

Merged
merged 20 commits into from
Oct 2, 2024
Merged
Show file tree
Hide file tree
Changes from 10 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
39 changes: 39 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# Generated from:
# https://github.com/zopefoundation/meta/tree/master/config/pure-python
#
# EditorConfig Configuration file, for more details see:
# http://EditorConfig.org
# EditorConfig is a convention description, that could be interpreted
# by multiple editors to enforce common coding conventions for specific
# file types

# top-most EditorConfig file:
# Will ignore other EditorConfig files in Home directory or upper tree level.
root = true


[*] # For All Files
# Unix-style newlines with a newline ending every file
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
# Set default charset
charset = utf-8
# Indent style default
indent_style = space
# Max Line Length - a hard line wrap, should be disabled
max_line_length = off

[*.{py,cfg,ini}]
# 4 space indentation
indent_size = 4

[*.{yml,zpt,pt,dtml,zcml}]
# 2 space indentation
indent_size = 2

[{Makefile,.gitmodules}]
# Tab indentation (no size specified, but view as 4 spaces)
indent_style = tab
indent_size = unset
tab_width = unset
2 changes: 2 additions & 0 deletions .github/workflows/pre-commit.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# Generated from:
# https://github.com/zopefoundation/meta/tree/master/config/pure-python
name: pre-commit

on:
Expand Down
67 changes: 67 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
# Generated from:
# https://github.com/zopefoundation/meta/tree/master/config/pure-python
name: tests

on:
push:
pull_request:
schedule:
- cron: '0 12 * * 0' # run once a week on Sunday
# Allow to run this workflow manually from the Actions tab
workflow_dispatch:

jobs:
build:
strategy:
# We want to see all failures:
fail-fast: false
matrix:
os:
- ["ubuntu", "ubuntu-latest"]
config:
# [Python version, tox env]
- ["3.11", "release-check"]
- ["3.8", "py38"]
- ["3.9", "py39"]
- ["3.10", "py310"]
- ["3.11", "py311"]
- ["3.12", "py312"]
- ["3.13", "py313"]
- ["3.11", "docs"]
# - ["3.11", "coverage"]

runs-on: ${{ matrix.os[1] }}
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name
name: ${{ matrix.config[1] }}
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.config[0] }}
allow-prereleases: true
- name: Pip cache
uses: actions/cache@v4
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ matrix.config[0] }}-${{ hashFiles('setup.*', 'tox.ini') }}
restore-keys: |
${{ runner.os }}-pip-${{ matrix.config[0] }}-
${{ runner.os }}-pip-
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install tox
- name: Test
if: ${{ !startsWith(runner.os, 'Mac') }}
run: tox -e ${{ matrix.config[1] }}
- name: Test (macOS)
if: ${{ startsWith(runner.os, 'Mac') }}
run: tox -e ${{ matrix.config[1] }}-universal2
- name: Coverage
if: matrix.config[1] == 'coverage'
run: |
pip install coveralls
coveralls --service=github
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
38 changes: 31 additions & 7 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,8 +1,32 @@
# Generated from:
# https://github.com/zopefoundation/meta/tree/master/config/pure-python
*.dll
*.egg-info/
*.profraw
*.pyc
*.pyo
*.so
.coverage
.coverage.*
.eggs/
.installed.cfg
.mr.developer.cfg
.tox/
.vscode/
__pycache__/
config/bin/
config/lib/
config/lib64/
config/pyvenv.cfg

# lib64 is a symlink on Ubuntu, so we need it without the trailing slash
config/lib64
bin/
build/
coverage.xml
develop-eggs/
develop/
dist/
docs/_build
eggs/
etc/
lib/
lib64
log/
parts/
pyvenv.cfg
testing.log
var/
8 changes: 0 additions & 8 deletions .isort.cfg

This file was deleted.

29 changes: 29 additions & 0 deletions .meta.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Generated from:
# https://github.com/zopefoundation/meta/tree/master/config/pure-python
[meta]
template = "pure-python"
commit-id = "8e97e857"

[python]
with-windows = false
with-pypy = false
with-future-python = false
with-docs = true
with-sphinx-doctests = false
with-macos = false

[tox]
use-flake8 = true

[coverage]
fail-under = 95

[manifest]
additional-rules = [
"include *.yaml",
"recursive-include docs *.bat",
"recursive-include src *.j2",
"recursive-include src *.md",
"recursive-include src *.sh",
"recursive-include src *.txt",
]
74 changes: 27 additions & 47 deletions .pre-commit-config.yaml
dataflake marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
@@ -1,48 +1,28 @@
---
# Generated from:
# https://github.com/zopefoundation/meta/tree/master/config/pure-python
minimum_pre_commit_version: '3.6'
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: fix-encoding-pragma
args: [--remove]
- id: check-yaml
- id: debug-statements
language_version: python3
- repo: https://github.com/pre-commit/mirrors-autopep8
rev: v2.0.4
hooks:
- id: autopep8
- repo: https://github.com/isidentical/teyit
rev: 0.4.3
hooks:
- id: teyit
- repo: https://github.com/PyCQA/flake8
rev: 7.1.1
hooks:
- id: flake8
language_version: python3
additional_dependencies: [flake8-typing-imports==1.15.0]
- repo: https://github.com/timothycrosley/isort
rev: 5.13.2
hooks:
- id: isort
args: [--filter-files]
files: \.py$
# If needed:
- repo: local
hooks:
- id: rst
name: rst
entry: rst-lint --encoding utf-8
exclude: ./doc/.*
files: .rst
language: python
additional_dependencies: [pygments, restructuredtext_lint]
# This can deal with sphinx directives
- repo: https://github.com/myint/rstcheck
rev: "v6.2.4"
hooks:
- id: rstcheck
args: [--ignore-messages, Duplicate implicit target.*]
- repo: https://github.com/pycqa/isort
rev: "5.13.2"
hooks:
- id: isort
- repo: https://github.com/hhatto/autopep8
rev: "v2.3.1"
hooks:
- id: autopep8
args: [--in-place, --aggressive, --aggressive]
- repo: https://github.com/asottile/pyupgrade
rev: v3.17.0
hooks:
- id: pyupgrade
args: [--py38-plus]
- repo: https://github.com/isidentical/teyit
rev: 0.4.3
hooks:
- id: teyit
- repo: https://github.com/PyCQA/flake8
rev: "7.1.1"
hooks:
- id: flake8
additional_dependencies:
- flake8-debugger == 4.1.2
25 changes: 25 additions & 0 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Generated from:
# https://github.com/zopefoundation/meta/tree/master/config/pure-python
# Read the Docs configuration file
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details

# Required
version: 2

# Set the version of Python and other tools you might need
build:
os: ubuntu-22.04
tools:
python: "3.11"

# Build documentation in the docs/ directory with Sphinx
sphinx:
configuration: docs/conf.py

# We recommend specifying your dependencies to enable reproducible builds:
# https://docs.readthedocs.io/en/stable/guides/reproducible-builds.html
python:
install:
- requirements: docs/requirements.txt
- method: pip
path: .
5 changes: 5 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Change log
==========

1.0 (unreleased)
----------------
dataflake marked this conversation as resolved.
Show resolved Hide resolved
4 changes: 4 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
<!--
Generated from:
https://github.com/zopefoundation/meta/tree/master/config/pure-python
-->
# Contributing to zopefoundation projects

The projects under the zopefoundation GitHub organization are open source and
Expand Down
21 changes: 21 additions & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Generated from:
# https://github.com/zopefoundation/meta/tree/master/config/pure-python
include *.md
include *.rst
include *.txt
include buildout.cfg
include tox.ini
include .pre-commit-config.yaml

recursive-include docs *.py
recursive-include docs *.rst
recursive-include docs *.txt
recursive-include docs Makefile

recursive-include src *.py
include *.yaml
recursive-include docs *.bat
recursive-include src *.j2
recursive-include src *.md
recursive-include src *.sh
recursive-include src *.txt
4 changes: 0 additions & 4 deletions README.md

This file was deleted.

19 changes: 19 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
``zope.meta``
=============

.. image:: https://img.shields.io/pypi/v/zope.meta.svg
:target: https://pypi.python.org/pypi/zope.meta/
:alt: Latest Version

.. image:: https://github.com/zopefoundation/zope.meta/actions/workflows/tests.yml/badge.svg
:target: https://github.com/zopefoundation/zope.meta/actions/workflows/tests.yml

.. image:: https://readthedocs.org/projects/zopemeta/badge/?version=latest
:target: https://zopemeta.readthedocs.io/en/latest/?badge=latest
:alt: Documentation Status

This package contains helper functions and scripts for maintaining package
configurations for Zope Foundation GitHub packages
(https://github.com/zopefoundation).

Please visit https://zopemeta.readthedocs.io for the documentation.
8 changes: 0 additions & 8 deletions config/requirements.txt

This file was deleted.

Loading