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

Adding my awesome file #35

Open
wants to merge 17 commits into
base: main
Choose a base branch
from
Open
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
28 changes: 6 additions & 22 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,18 +20,8 @@ repos:
- id: trailing-whitespace
args:
- "--markdown-linebreak-ext=md"
- repo: "https://github.com/pre-commit/pygrep-hooks"
rev: v1.9.0
hooks:
- id: python-check-blanket-noqa
- id: python-check-blanket-type-ignore
- id: python-use-type-annotations
- repo: "https://github.com/pycqa/isort"
rev: 5.10.1
hooks:
- id: isort
- repo: "https://github.com/psf/black"
rev: 22.3.0
- repo: https://github.com/psf/black-pre-commit-mirror
rev: "23.9.1"
hooks:
- id: black
- repo: "https://github.com/pre-commit/mirrors-prettier"
Expand All @@ -49,14 +39,8 @@ repos:
- id: pyupgrade
args:
- "--py36-plus"
- repo: https://github.com/pycqa/pylint
# 2.13.9 is the last version supporting Python 3.6
rev: v2.13.9
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: "v0.4.5"
hooks:
- id: pylint
- repo: "https://github.com/fsfe/reuse-tool"
rev: v0.14.0
hooks:
- id: reuse
additional_dependencies:
- python-debian==0.1.40
- id: ruff
args: ["--fix", "--show-fixes"]
1 change: 0 additions & 1 deletion newfile2

This file was deleted.

58 changes: 58 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
# SPDX-FileCopyrightText: 2022 Fermi Research Alliance, LLC
# SPDX-License-Identifier: Apache-2.0

[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"

[project]
name = "planetsmath"
requires-python = ">= 3.8"
version = "0.0.1"
description = "Lovely Spam! Wonderful Spam!"
readme = "README.md"
license = {file = "LICENSE"}

[tool.ruff]
lint.select = [
"E", "F", "W", # flake8
"B", # flake8-bugbear
"I", # isort
"ARG", # flake8-unused-arguments
"C4", # flake8-comprehensions
"EM", # flake8-errmsg
"ICN", # flake8-import-conventions
"ISC", # flake8-implicit-str-concat
"G", # flake8-logging-format
"PGH", # pygrep-hooks
"PIE", # flake8-pie
"PL", # pylint
"PT", # flake8-pytest-style
"PTH", # flake8-use-pathlib
"RET", # flake8-return
"RUF", # Ruff-specific
"SIM", # flake8-simplify
"T20", # flake8-print
"UP", # pyupgrade
"YTT", # flake8-2020
"EXE", # flake8-executable
"NPY", # NumPy specific rules
"PD", # pandas-vet
]
lint.extend-ignore = [
"PLR", # Design related pylint codes
"E501", # Line too long
"PT004", # Use underscore for non-returning fixture (use usefixture instead)
]
lint.typing-modules = ["mypackage._compat.typing"]
src = ["src"]
lint.unfixable = [
"T20", # Removes print statements
"F841", # Removes unused variables
]
exclude = []
lint.flake8-unused-arguments.ignore-variadic-names = true
lint.isort.required-imports = ["from __future__ import annotations"]

[tool.ruff.lint.per-file-ignores]
"tests/**" = ["T20"]
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# SPDX-FileCopyrightText: 2022 Fermi Research Alliance, LLC
# SPDX-License-Identifier: Apache-2.0
from __future__ import annotations

from setuptools import setup

Expand Down
12 changes: 10 additions & 2 deletions src/planetsmath/functions.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# SPDX-FileCopyrightText: 2022 Fermi Research Alliance, LLC
# SPDX-License-Identifier: Apache-2.0
from __future__ import annotations


def sum_function(list):
Expand All @@ -23,8 +24,15 @@ def sum_function(list):
return sum


def sum_product(list):
def print_hello():
print("hello!")


def sum_product(lists):
def print_hello():
print("hello!")

product = 1.0
for item in list:
for item in lists:
product *= item
return product
3 changes: 3 additions & 0 deletions src/planetsmath/myFile.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Thunderstorms!
That's my favorite weather!
Why does Fermilab have a tornado shelter?
1 change: 1 addition & 0 deletions src/planetsmath/myfile_guillermo.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
nothing is the best color but everything is my least favorite color
1 change: 1 addition & 0 deletions src/planetsmath/test_functions.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# SPDX-FileCopyrightText: 2022 Fermi Research Alliance, LLC
# SPDX-License-Identifier: Apache-2.0
from __future__ import annotations

from .functions import sum_function

Expand Down
Loading