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

Devops: Move package configuration entirely to pyproject.toml #42

Merged
merged 1 commit into from
May 30, 2024
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
12 changes: 6 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:

- name: Install python dependencies
run: |
pip install .[pre_commit,testing]
pip install .[dev]
pip freeze

- name: Run pre-commit
Expand Down Expand Up @@ -52,7 +52,7 @@ jobs:

- name: Install pgsu
run: |
pip install -e .[testing]
pip install -e .[dev]
pip freeze

- name: Run test suite
Expand Down Expand Up @@ -95,7 +95,7 @@ jobs:

- name: Install pgsu
run: |
pip install -e .[testing]
pip install -e .[dev]
pip freeze

- name: Run test suite
Expand Down Expand Up @@ -144,7 +144,7 @@ jobs:

- name: Install pgsu
run: |
pip install -e .[testing]
pip install -e .[dev]
pip freeze

- name: Run test suite
Expand Down Expand Up @@ -187,7 +187,7 @@ jobs:
#
# - name: Install pgsu
# run: |
# pip install -e .[testing]
# pip install -e .[dev]
# pip freeze
#
# # note: I tested this locally with *only* the homebrew postgres server running and it worked.
Expand Down Expand Up @@ -233,7 +233,7 @@ jobs:

- name: Install pgsu
run: |
pip install -e .[testing]
pip install -e .[dev]
pip freeze

- name: Run test suite
Expand Down
2 changes: 0 additions & 2 deletions MANIFEST.in

This file was deleted.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,6 @@ Executing query: SELECT usename FROM pg_user

Run the tests as follows:
```bash
pip install -e .[testing]
pip install -e .[dev]
pytest
```
5 changes: 2 additions & 3 deletions pgsu/__init__.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# -*- coding: utf-8 -*-
"""Connect to an existing PostgreSQL cluster as the `postgres` superuser and execute SQL commands.

"""
"""Connect to an existing PostgreSQL cluster as the `postgres` superuser and execute SQL commands."""
__version__ = '0.2.4'

import logging
import traceback
Expand Down
65 changes: 63 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,67 @@
[build-system]
requires = ["setuptools>=46.4.0", "wheel"]
build-backend = "setuptools.build_meta"
build-backend = 'flit_core.buildapi'
requires = ['flit_core>=3.4,<4']

[project]
authors = [
{name = 'AiiDA Team', email = 'aiidateam@gmail.com'}
]
classifiers = [
'License :: OSI Approved :: MIT License',
'Operating System :: MacOS :: MacOS X',
'Operating System :: Microsoft :: Windows',
'Operating System :: POSIX :: Linux',
'Programming Language :: Python',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3 :: Only',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
'Programming Language :: Python :: 3.11',
'Programming Language :: Python :: Implementation :: CPython',
]
dependencies = [
'click',
'psycopg[binary]>=3.0'
]
dynamic = ['description', 'version']
license = {file = 'LICENSE'}
name = 'pgsu'
readme = 'README.md'
requires-python = '>=3.7'

[project.optional-dependencies]
dev = [
'pre-commit~=2.2',
'pylint~=2.5.0',
'pgtest>=1.3.1',
'pytest',
'pytest-cov'
]

[project.scripts]
pgsu = 'pgsu.cli:run'

[project.urls]
homepage = 'https://github.com/aiidateam/pgsu'
source = 'https://github.com/aiidateam/pgsu'
tracker = 'https://github.com/aiidateam/pgsu/issues'

[tool.flit.module]
name = 'pgsu'

[tool.flit.sdist]
exclude = [
'.github/',
'tests/',
'.coverage',
'.gitignore',
'.pre-commit-config.yaml'
]

[tool.coverage.run]
parallel = true

[tool.pylint.format]
max-line-length = 120
Expand Down
52 changes: 0 additions & 52 deletions setup.cfg

This file was deleted.

7 changes: 0 additions & 7 deletions setup.py

This file was deleted.

2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@ usedevelop = true
[testenv:py{37,38,39}]
description = Run unit tests with this Python version
extras =
testing
dev
commands = pytest {posargs}
Loading