Skip to content

Commit

Permalink
Switch back to using pyproject.toml to build (#169)
Browse files Browse the repository at this point in the history
* Switch back to using `pyproject.toml` to build

* Update CHANGELOG

* Fix typo

* Use `pip install`

* Update .github/workflows/gh-ci.yaml

Co-authored-by: Lily Wang <[email protected]>

* Update .github/workflows/gh-ci.yaml

* switch hyphen to underscore in check

* Cleanup

---------

Co-authored-by: Lily Wang <[email protected]>
Co-authored-by: Lily Wang <[email protected]>
  • Loading branch information
3 people authored Jan 15, 2025
1 parent b4ee21b commit 350dcbd
Show file tree
Hide file tree
Showing 8 changed files with 84 additions and 146 deletions.
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
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; }
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 = "[email protected]"},
]
maintainers = [
{name = "Lily Wang", email = "[email protected]"},
]
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
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.

0 comments on commit 350dcbd

Please sign in to comment.