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

style: cookiecutter and pre-commit formatting updates #77

Merged
merged 12 commits into from
Jan 7, 2025
4 changes: 3 additions & 1 deletion .flake8
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
# As of now, flake8 does not natively support configuration via pyproject.toml
# https://github.com/microsoft/vscode-flake8/issues/135
[flake8]
exclude =
.git,
__pycache__,
build,
dist,
doc/source/conf.py
max-line-length = 115
max-line-length = 79
# Ignore some style 'errors' produced while formatting by 'black'
# https://black.readthedocs.io/en/stable/guides/using_black_with_other_tools.html#labels-why-pycodestyle-warnings
extend-ignore = E203
7 changes: 0 additions & 7 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -90,10 +90,3 @@ target/

# Ipython Notebook
.ipynb_checkpoints

# version information
setup.cfg
/src/diffpy/*/version.cfg

# Rever
rever/
sbillinge marked this conversation as resolved.
Show resolved Hide resolved
3 changes: 2 additions & 1 deletion .isort.cfg
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
[settings]
line_length = 115
# Keep import statement below line_length character limit
line_length = 79
multi_line_output = 3
include_trailing_comma = True
sbillinge marked this conversation as resolved.
Show resolved Hide resolved
2 changes: 1 addition & 1 deletion AUTHORS.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Authors
=======

Billinge Group and community contributors.
Billinge Group members and community contributors

Contributors
------------
Expand Down
3 changes: 1 addition & 2 deletions LICENSE.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
BSD 3-Clause License

Copyright (c) 2024, The Trustees of Columbia University
in the City of New York.
Copyright (c) 2022-2025, The Trustees of Columbia University in the City of New York.
All rights reserved.

Redistribution and use in source and binary forms, with or without
Expand Down
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
.. |Tracking| image:: https://img.shields.io/badge/issue_tracking-github-blue
:target: https://github.com/diffpy/diffpy.fourigui/issues

Tool for visualizing 3D diffraction and PDF Images.
Tool for visualizing 3D diffraction and PDF images.

Diffpy.fourigui is a tool to visualize and process 3D data sets written with the Python programming language.
Diffpy.fourigui always displays one slice perpendicular to one axis and allows scrolling through the 3D data set along
Expand Down
18 changes: 16 additions & 2 deletions doc/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,13 @@
# (source start file, target name, title,
# author, documentclass [howto, manual, or own class]).
latex_documents = [
("index", "diffpy.fourigui.tex", "diffpy.fourigui Documentation", ab_authors, "manual"),
(
sbillinge marked this conversation as resolved.
Show resolved Hide resolved
"index",
"diffpy.fourigui.tex",
"diffpy.fourigui Documentation",
ab_authors,
"manual",
),
]

# The name of an image file (relative to this directory) to place at the top of
Expand Down Expand Up @@ -251,7 +257,15 @@

# One entry per manual page. List of tuples
# (source start file, name, description, authors, manual section).
man_pages = [("index", "diffpy.fourigui", "diffpy.fourigui Documentation", ab_authors, 1)]
man_pages = [
(
cadenmyers13 marked this conversation as resolved.
Show resolved Hide resolved
"index",
"diffpy.fourigui",
"diffpy.fourigui Documentation",
ab_authors,
1,
)
]

# If true, show URL addresses after external links.
# man_show_urls = False
Expand Down
3 changes: 1 addition & 2 deletions doc/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

.. |title| replace:: diffpy.fourigui documentation

diffpy.fourigui - Tool for visualizing 3D diffraction and PDF Images..
diffpy.fourigui - Tool for visualizing 3D diffraction and PDF images.

| Software version |release|.
| Last updated |today|.
Expand Down Expand Up @@ -37,7 +37,6 @@ Table of contents
release
Package API <api/diffpy.fourigui>


=======
Indices
=======
Expand Down
3 changes: 1 addition & 2 deletions doc/source/license.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@ OPEN SOURCE LICENSE AGREEMENT
=============================
BSD 3-Clause License

Copyright (c) 2024, The Trustees of Columbia University in
the City of New York.
Copyright (c) 2022-2025, The Trustees of Columbia University in the City of New York.
All Rights Reserved.

Redistribution and use in source and binary forms, with or without
Expand Down
24 changes: 24 additions & 0 deletions news/copyright-styling.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
**Added:**

* <news item>

**Changed:**

* <news item>

**Deprecated:**

* <news item>

**Removed:**

* <news item>

**Fixed:**

* Update copyright to 2022-2025.
* Format code to comply with group standards.

**Security:**

* <news item>
10 changes: 5 additions & 5 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ build-backend = "setuptools.build_meta"
name = "diffpy.fourigui"
dynamic=['version', 'dependencies']
authors = [
{ name="Simon J.L. Billinge group", email="[email protected]" },
{ name="Simon Billinge", email="[email protected]" },
]
maintainers = [
{ name="Simon J.L. Billinge group", email="[email protected]" },
{ name="Simon Billinge", email="[email protected]" },
]
description = "Tool for visualizing 3D diffraction and PDF Images."
keywords = ['diffraction', 'pdf', 'pair distribution function', 'gui']
description = "Tool for visualizing 3D diffraction and PDF images."
keywords = ['diffraction', 'PDF', 'pair distribution function', 'gui']
readme = "README.rst"
requires-python = ">=3.11, <3.14"
classifiers = [
Expand Down Expand Up @@ -60,7 +60,7 @@ ignore-words = ".codespell/ignore_words.txt"
skip = "*.cif,*.dat"

[tool.black]
line-length = 115
line-length = 79
include = '\.pyi?$'
exclude = '''
/(
Expand Down
2 changes: 1 addition & 1 deletion src/diffpy/__init__.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env python
##############################################################################
#
# (c) 2024 The Trustees of Columbia University in the City of New York.
# (c) 2022-2025 The Trustees of Columbia University in the City of New York.
# All rights reserved.
#
# File coded by: Billinge Group members and community contributors.
Expand Down
4 changes: 2 additions & 2 deletions src/diffpy/fourigui/__init__.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env python
##############################################################################
#
# (c) 2024 The Trustees of Columbia University in the City of New York.
# (c) 2022-2025 The Trustees of Columbia University in the City of New York.
# All rights reserved.
#
# File coded by: Billinge Group members and community contributors.
Expand All @@ -12,7 +12,7 @@
# See LICENSE.rst for license information.
#
##############################################################################
"""Tool for visualizing 3D diffraction and PDF Images."""
"""Tool for visualizing 3D diffraction and PDF images."""

# package version
from diffpy.fourigui.version import __version__
Expand Down
Loading
Loading