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

Switch back to using pyproject.toml to build #169

Merged
merged 9 commits into from
Jan 15, 2025
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
7 changes: 4 additions & 3 deletions .github/workflows/gh-ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -150,12 +150,13 @@ jobs:

- name: Build package
run: |
python setup.py sdist
python3 -m pip install --upgrade build
mattwthompson marked this conversation as resolved.
Show resolved Hide resolved
python3 -m build

- name: Check package build
run: |
DISTRIBUTION=$(ls -t1 dist/openff-nagl-*.tar.gz | head -n 1)
test -n "${DISTRIBUTION}" || { echo "no distribution dist/openff-nagl-*.tar.gz found"; exit 1; }
DISTRIBUTION=$(ls -t1 dist/openff_nagl-*.tar.gz | head -n 1)
test -n "${DISTRIBUTION}" || { echo "no distribution dist/openff_nagl-*.tar.gz found"; exit 1; }
Comment on lines -157 to +159
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems fine to me

echo "twine check $DISTRIBUTION"
twine check $DISTRIBUTION

Expand Down
12 changes: 0 additions & 12 deletions .lgtm.yml

This file was deleted.

10 changes: 5 additions & 5 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,16 @@
exclude: '^(\.tox|ci/templates|\.bumpversion\.cfg)(/|$)'
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: master
rev: v5.0.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: debug-statements
- repo: https://github.com/timothycrosley/isort
rev: master
rev: 5.13.2
hooks:
- id: isort
- repo: https://gitlab.com/pycqa/flake8
rev: master
- repo: https://github.com/pycqa/flake8
rev: 7.1.1
hooks:
- id: flake8
- id: flake8
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ NAGL

| **Latest release** | [![Last release tag](https://img.shields.io/github/release-pre/openforcefield/openff-nagl.svg)](https://github.com/openforcefield/openff-nagl/releases) ![GitHub commits since latest release (by date) for a branch](https://img.shields.io/github/commits-since/openforcefield/openff-nagl/latest) [![Documentation Status](https://readthedocs.org/projects/openff-nagl/badge/?version=latest)](https://docs.openforcefield.org/projects/nagl/en/latest/?badge=latest) |
| :----------------- | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Status** | [![GH Actions Status](https://github.com/openforcefield/openff-nagl/actions/workflows/gh-ci.yaml/badge.svg)](https://github.com/openforcefield/openff-nagl/actions?query=branch%3Amain+workflow%3Agh-ci) [![codecov](https://codecov.io/gh/openforcefield/openff-nagl/branch/main/graph/badge.svg)](https://codecov.io/gh/openforcefield/openff-nagl/branch/main) [![Language grade: Python](https://img.shields.io/lgtm/grade/python/g/openforcefield/openff-nagl.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/openforcefield/openff-nagl/context:python) |
| **Status** | [![GH Actions Status](https://github.com/openforcefield/openff-nagl/actions/workflows/gh-ci.yaml/badge.svg)](https://github.com/openforcefield/openff-nagl/actions?query=branch%3Amain+workflow%3Agh-ci) [![codecov](https://codecov.io/gh/openforcefield/openff-nagl/branch/main/graph/badge.svg)](https://codecov.io/gh/openforcefield/openff-nagl/branch/main) |
| **Community** | [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT) [![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.12792526.svg)](https://doi.org/10.5281/zenodo.12792526) |

A playground for applying graph convolutional networks to molecules, with a focus on learning continuous "atom-type" embeddings and from these classical molecule force field parameters.
Expand Down
5 changes: 5 additions & 0 deletions docs/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@ The rules for this file:
* accompany each entry with github issue/PR number (Issue #xyz)
-->

## Current development

### Changed
- Switched build from using `setup.py` to `pyproject.toml`.

## v0.5.0 -- 2024-11-06

### Authors
Expand Down
69 changes: 69 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
[build-system]
requires = [
"setuptools",
"versioneer[toml]==0.29",
"wheel",
]
build-backend = "setuptools.build_meta"

[project]
name = "openff-nagl"
description = "A playground for applying graph convolutional networks to molecules."
readme = "README.md"
license = { file = "LICENSE" }
authors = [
{name = "Lily Wang", email = "lily.wang@openforcefield.org"},
]
maintainers = [
{name = "Lily Wang", email = "lily.wang@openforcefield.org"},
]
requires-python = ">=3.10"
dynamic = ["version"]

[tool.setuptools.packages]
find = {}

[project.optional-dependencies]
test = [
"pytest>=6.0",
"pytest-xdist>=2.5",
"pytest-cov>=3.0",
]
doc = [
"sphinx>=1.8",
"openff-sphinx-theme @ git+https://github.com/openforcefield/openff-sphinx-theme.git@main",
]

[project.scripts]
openff-nagl = "openff.nagl.cli:cli"

[project.urls]
source = "https://github.com/openforcefield/openff-nagl"
documentation = "https://docs.openforcefield.org/projects/nagl/"

[tool.pytest.ini_options]
testpaths = [
"openff/nagl/tests",
]

[tool.versioneer]
VCS = "git"
style = "pep440"
versionfile_source = "openff/nagl/_version.py"
versionfile_build = "openff/nagl/_version.py"
tag_prefix = "v"
parentdir_prefix = "openff-nagl-"

[tool.coverage.run]
omit = [
"*/*/_tests/*",
"openff/nagl/_version.py",
]

[tool.coverage.report]
exclude_lines = [
"pragma: no cover",
"if TYPE_CHECKING:",
"raise NotImplementedError",
"@overload",
]
41 changes: 0 additions & 41 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -1,59 +1,18 @@
# Helper file to handle all configs

[coverage:run]
# .coveragerc to control coverage.py and pytest-cov
omit =
# Omit the tests
*/*/tests/*
# Omit generated versioneer
openff/nagl/_version.py

[coverage:report]
exclude_lines =
pragma: no cover
if TYPE_CHECKING:

[isort]
multi_line_output = 3
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks so much for cleaning this up!

include_trailing_comma = True
force_grid_wrap = 0
use_parentheses = True
line_length = 80


[yapf]
# YAPF, in .style.yapf files this shows up as "[style]" header
COLUMN_LIMIT = 80
INDENT_WIDTH = 4
USE_TABS = False

[flake8]
# Flake8, PyFlakes, etc
max-line-length = 80
exclude = versioneer.py

[versioneer]
# Automatic version numbering scheme
VCS = git
style = pep440
versionfile_source = openff/nagl/_version.py
versionfile_build = openff/nagl/_version.py
tag_prefix = v

[aliases]
test = pytest

[tool:pytest]
testpaths = openff/nagl/tests

[build_sphinx]
all-files = 1
source-dir = docs/
build-dir = docs/_build
warning-is-error = 1

[options]
packages = find_namespace:

[options.packages.find]
include = ["openff.*"]
84 changes: 0 additions & 84 deletions setup.py

This file was deleted.

Loading