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

switch to pyproject only #21

Merged
merged 3 commits into from
Jul 24, 2023
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
10 changes: 10 additions & 0 deletions .flake8
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
[flake8]
max-line-length = 88
exclude = docs,
*/__init__.py,
ignore = E203,
E266,
E302,
E501,
E741,
W503,
7 changes: 3 additions & 4 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: Run tests

on:
on:
pull_request:
paths:
- '**.py'
Expand All @@ -20,15 +20,14 @@ jobs:
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install graphviz
- name: Install graphviz
run: sudo apt-get install graphviz
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install -r requirements_dev.txt
- name: Setup inheritance_explorer
run: |
python -m pip install -e .
python -m pip install -e .[dev]
- name: Run Tests
run: pytest --cov=./ --cov-report=xml:coverage/coverage.xml

Expand Down
9 changes: 4 additions & 5 deletions .github/workflows/style-checks.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
name: Style Checks
on:
on:
pull_request:
paths:
- '**.py'
- '**style-checks.yml'
- 'tests/lint_requirements.txt'

jobs:
flake8:
Expand All @@ -18,7 +17,7 @@ jobs:
python-version: 3.9
- name: install
id: install
run : pip install -r tests/lint_requirements.txt
run : pip install .[lint]

- name: check
id: flake8
Expand All @@ -37,7 +36,7 @@ jobs:
python-version: 3.9
- name: install
id: install
run : pip install -r tests/lint_requirements.txt
run : pip install .[lint]

- name: check
id: black
Expand All @@ -56,7 +55,7 @@ jobs:
python-version: 3.9
- name: install
id: install
run : pip install -r tests/lint_requirements.txt
run : pip install .[lint]

- name: check
id: isort
Expand Down
6 changes: 3 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
repos:
- repo: https://github.com/ambv/black
rev: 22.8.0 # keep in sync with tests/lint_requirements.txt
rev: 22.8.0 # keep in sync with pyproject.toml
hooks:
- id: black
language_version: python3
- repo: https://github.com/timothycrosley/isort
rev: '5.12.0' # keep in sync with tests/lint_requirements.txt
rev: '5.12.0' # keep in sync with pyproject.toml
hooks:
- id: isort
- repo: https://github.com/PyCQA/flake8
rev: '6.0.0' # keep in sync with tests/lint_requirements.txt
rev: '6.0.0' # keep in sync with pyproject.toml
hooks:
- id: flake8
11 changes: 7 additions & 4 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,11 @@ build:
tools:
python: "3.10"

# Optionally declare the Python requirements required to build your docs
# installation, will result in pip install .[docs, dev]
python:
install:
- requirements: requirements.txt
- requirements: requirements_dev.txt
install:
- method: pip
path: .
extra_requirements:
- docs
- dev
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
66 changes: 66 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,69 @@ target-version = ['py37']
profile = "black"
combine_as_imports = true
skip = ["venv", "benchmarks"]

[build-system]
requires = ["setuptools>=61.0"]
build-backend = "setuptools.build_meta"

[project]
name = "inheritance_explorer"
version = "0.1.2"
description = "A tool for exploring complex inheritance patters in python code"
readme = "README.rst"
requires-python = ">=3.8"
authors = [
{ name="Chris Havlin", email="[email protected]" },
]
classifiers=[
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Natural Language :: English",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
]
dependencies = ['pydot',
'pycode_similar',
'numpy',
'matplotlib',
'pyvis',
'networkx',
'click',
'ipywidgets',
'jupyterlab'
]
license={file = "LICENSE"}

[tool.setuptools]
include-package-data = true


[project.scripts]
inheritance_explorer = "inheritance_explorer.cli:map_class"

[project.urls]
"Homepage" = "https://github.com/data-exp-lab/inheritance_explorer"
"Bug Tracker" = "https://github.com/data-exp-lab/inheritance_explorer/issues"


[project.optional-dependencies]
dev = [
"pytest>=3",
"pytest-cov",
"yt>4.1",
"pre-commit",
]
docs = [
"Sphinx==1.8.5",
"jinja2<3.1.0",
"nbsphinx",
]
lint = [
"black==22.8.0",
"isort==5.12.0",
"flake8==6.0.0"
]

9 changes: 0 additions & 9 deletions requirements.txt

This file was deleted.

17 changes: 0 additions & 17 deletions requirements_dev.txt

This file was deleted.

29 changes: 0 additions & 29 deletions setup.cfg

This file was deleted.

52 changes: 0 additions & 52 deletions setup.py

This file was deleted.

4 changes: 0 additions & 4 deletions tests/lint_requirements.txt

This file was deleted.

Loading