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

Update tooling to better match other NIU projects #21

Merged
merged 7 commits into from
Oct 5, 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
2 changes: 1 addition & 1 deletion .github/workflows/test_and_deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
strategy:
matrix:
# Run all supported Python versions on linux
python-version: ["3.8", "3.9", "3.10", "3.11"]
python-version: ["3.9", "3.10", "3.11"]
os: [ubuntu-latest]
# Include one windows and macos run
include:
Expand Down
22 changes: 14 additions & 8 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
exclude: 'conf.py'
# Configuring https://pre-commit.ci/ bot
ci:
autoupdate_schedule: monthly
repos:
- repo: https://github.com/pycqa/isort
rev: 5.12.0
hooks:
- id: isort
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
Expand All @@ -15,17 +15,23 @@ repos:
args: [--fix=lf]
- id: requirements-txt-fixer
- id: trailing-whitespace
- repo: https://github.com/charliermarsh/ruff-pre-commit
rev: v0.0.238
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.0.291
hooks:
- id: ruff
- repo: https://github.com/psf/black
rev: 22.12.0
rev: 23.9.1
hooks:
- id: black
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v0.991
rev: v1.5.1
hooks:
- id: mypy
additional_dependencies:
- types-setuptools
- repo: https://github.com/mgedmin/check-manifest
rev: "0.49"
hooks:
- id: check-manifest
args: [--no-build-isolation]
additional_dependencies: [setuptools-scm]
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
[![PyPI](https://img.shields.io/pypi/v/fancylog.svg)](https://pypi.org/project/fancylog)
[![Downloads](https://pepy.tech/badge/fancylog)](https://pepy.tech/project/fancylog)
[![Wheel](https://img.shields.io/pypi/wheel/fancylog.svg)](https://pypi.org/project/fancylog)
[![Development Status](https://img.shields.io/pypi/status/fancylog.svg)](https://github.com/adamltyson/fancylog)
[![Development Status](https://img.shields.io/pypi/status/fancylog.svg)](https://github.com/neuroinformatics-unit/fancylog)
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/python/black)
[![Contributions](https://img.shields.io/badge/Contributions-Welcome-brightgreen.svg)](https://github.com/adamltyson/fancylog)
[![Contributions](https://img.shields.io/badge/Contributions-Welcome-brightgreen.svg)](https://github.com/neuroinformatics-unit/fancylog)

# fancylog
Fancier logging with python.
Expand Down Expand Up @@ -33,7 +33,7 @@ pip install fancylog[git]

#### To run example
```bash
git clone https://github.com/adamltyson/fancylog
git clone https://github.com/neuroinformatics-unit/fancylog
pip install -e .
python fancylog/example.py /path/to/output/log/dir
```
Expand Down
1 change: 0 additions & 1 deletion fancylog/fancylog.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,6 @@ def __init__(
write_variables=True,
log_header=None,
):

self.file = open(file, "w", encoding="utf-8")
self.program = program
if write_header:
Expand Down
38 changes: 26 additions & 12 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,14 @@ name = "fancylog"
authors = [{name = "Adam Tyson", email= "[email protected]"}]
description = "Fancier logging in Python"
readme = "README.md"
requires-python = ">=3.6.0"
requires-python = ">=3.9.0"
dynamic = ["version"]

license = {text = "BSD-3-Clause"}

classifiers = [
"Development Status :: 4 - Beta",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
Expand All @@ -23,23 +21,19 @@ classifiers = [
dependencies = ["rich"]

[project.urls]
homepage = "https://github.com/adamltyson/fancylog"
bug_tracker = "https://github.com/adamltyson/fancylog/issues"
documentation = "https://github.com/adamltyson/fancylog"
source_code = "https://github.com/adamltyson/fancylog"
user_support = "https://github.com/adamltyson/fancylog/issues"
homepage = "https://github.com/neuroinformatics-unit/fancylog"
bug_tracker = "https://github.com/neuroinformatics-unit/fancylog/issues"
documentation = "https://github.com/neuroinformatics-unit/fancylog"
source_code = "https://github.com/neuroinformatics-unit/fancylog"
user_support = "https://github.com/neuroinformatics-unit/fancylog/issues"

[project.optional-dependencies]
dev = [
"pytest",
"pytest-cov",
"coverage",
"tox",
"black",
"isort",
"mypy",
"pre-commit",
"ruff",
"setuptools_scm",
]

Expand Down Expand Up @@ -105,3 +99,23 @@ ignore = [
[tool.ruff]
line-length = 79
exclude = ["__init__.py","build",".eggs"]


[tool.tox]
legacy_tox_ini = """
[tox]
envlist = py{39,310,311}
isolated_build = True

[gh-actions]
python =
3.9: py39
3.10: py310
3.11: py311

[testenv]
extras =
dev
commands =
pytest -v --color=yes --cov=fancylog --cov-report=xml
"""
2 changes: 0 additions & 2 deletions pytest.ini

This file was deleted.

16 changes: 0 additions & 16 deletions tox.ini

This file was deleted.