Skip to content

Commit 66be1a5

Browse files
authored
Merge pull request #14 from Iximiel/feature/setupTopyproject
Reorgainizig the repository to use pyproject.toml
2 parents 8a9cc11 + 69677aa commit 66be1a5

File tree

19 files changed

+93
-45
lines changed

19 files changed

+93
-45
lines changed

.github/workflows/main.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,14 +110,15 @@ jobs:
110110
with:
111111
python-version: ${{ matrix.python-version }}
112112
cache: 'pip'
113-
cache-dependency-path: setup.py
113+
cache-dependency-path: pyproject.toml
114114
- name: Install dependencies
115115
run: |
116116
python -m pip install --upgrade pip
117117
python -m pip install tox
118118
- name: Run tests
119119
run: |
120-
python -m tox
120+
#as now we do not want to be insulted by ruff, so only tests:
121+
python -m tox -e tests
121122
122123
- name: Upload Coverage to Codecov
123124
uses: codecov/codecov-action@v5

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ build
44
.coverage
55
.eggs
66
.tox
7+
.python-version
78
__pycache__
89
coverage.xml
910
# remainings of tox tests
@@ -17,4 +18,4 @@ coverage.xml
1718
/env*
1819
*.zip
1920
*.stderr.*
20-
/test*
21+
/test*.md

PlumedToHTML/.gitignore

Lines changed: 0 additions & 1 deletion
This file was deleted.

PlumedToHTML/tests/.gitignore

Lines changed: 0 additions & 1 deletion
This file was deleted.

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
[![Total alerts](https://img.shields.io/lgtm/alerts/g/plumed/PlumedToHTML.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/plumed/PlumedToHTML/alerts/)
44
[![Language grade: Python](https://img.shields.io/lgtm/grade/python/g/plumed/PlumedToHTML.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/plumed/PlumedToHTML/context:python)
55
[![PyPI version](https://badge.fury.io/py/PlumedToHTML.svg)](https://badge.fury.io/py/PlumedToHTML)
6+
![PyPI - Python Version](https://img.shields.io/pypi/pyversions/PlumedToHTML)
67

78
# PlumedToHTML
89

pyproject.toml

Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
[build-system]
2+
# a lower limit on the version might be needed
3+
requires = ["setuptools"]
4+
build-backend = "setuptools.build_meta"
5+
6+
[project]
7+
name = "PlumedToHTML"
8+
version = "0.101"
9+
description = "A package for creating prettified HTML for PLUMED files"
10+
authors = [{ name = "Gareth Tribello", email = "[email protected]" }]
11+
maintainers = [{ name = "Daniele Rapetti", email = "[email protected]" }]
12+
requires-python = ">=3.8"
13+
readme = "README.md"
14+
license = { text = "LGPL-2.1-only" }
15+
keywords = ["PLUMED", "HTML", "developer", "documentation", "prettified"]
16+
classifiers = [
17+
# How mature is this project? Common values are
18+
# 3 - Alpha
19+
# 4 - Beta
20+
# 5 - Production/Stable
21+
"Development Status :: 4 - Beta",
22+
"License :: OSI Approved :: GNU Lesser General Public License v2 or later (LGPLv2+)",
23+
#"Operating System :: OS Independent",
24+
"Operating System :: POSIX :: Linux",
25+
"Operating System :: MacOS",
26+
27+
"Programming Language :: Python :: 3",
28+
"Programming Language :: Python :: 3.8",
29+
"Programming Language :: Python :: 3.9",
30+
"Programming Language :: Python :: 3.10",
31+
"Programming Language :: Python :: 3.11",
32+
"Programming Language :: Python :: 3.12",
33+
"Programming Language :: Python :: 3.13",
34+
35+
"Framework :: tox",
36+
"Framework :: Pytest",
37+
38+
"Topic :: Text Processing :: Markup :: HTML",
39+
40+
"Intended Audience :: Developers",
41+
"Intended Audience :: Science/Research",
42+
]
43+
dependencies = ["bs4", "lxml", "pygments", "requests"]
44+
45+
[project.urls]
46+
Repository = "https://github.com/plumed/PlumedToHTML"
47+
#this might not be useful, but it is here for fun :D
48+
"PLUMED Website" = "https://www.plumed.org/"
49+
50+
[tool.setuptools]
51+
#this makes possible to distribuite the assets directory
52+
include-package-data = true
53+
[tool.setuptools.packages.find]
54+
#this finds the package(s) within the src directory
55+
where = ["src"]
56+
[tool.setuptools.package-data]
57+
#we state which files we want to include per package
58+
PlumedToHTML = ['assets/*.html']
59+
60+
#this is not elegant, but having all the settings in a single file is cozier
61+
[tool.tox]
62+
legacy_tox_ini = """
63+
[tox]
64+
env_list =
65+
tests
66+
lint
67+
68+
[testenv:tests]
69+
deps = pytest
70+
pytest-cov
71+
commands = pytest --cov=PlumedToHTML --cov-report=term-missing
72+
73+
[pytest]
74+
testpaths =
75+
tests
76+
77+
[testenv:lint]
78+
skip_install = true
79+
deps =
80+
ruff==0.9.6
81+
commands =
82+
ruff check src/PlumedToHTML
83+
ruff format src/PlumedToHTML --check
84+
"""

setup.py

Lines changed: 0 additions & 27 deletions
This file was deleted.

0 commit comments

Comments
 (0)