Skip to content

Commit

Permalink
migrate from setup.py to pyproject.toml (#86)
Browse files Browse the repository at this point in the history
* migrate from setup.py to pyproject.toml

* remove requirements.txt

* update dockerfile

* fix module matching bug

* update test

* switch to pip install in CI test

* fix doc building

Co-authored-by: Han Wang <wang_han@iapcm.ac.cn>
  • Loading branch information
wanghan-iapcm and Han Wang committed Oct 13, 2022
1 parent d572eb2 commit 2f6643e
Show file tree
Hide file tree
Showing 5 changed files with 55 additions and 72 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
pip install -e .
pip install mock coverage codecov
- name: Test
run: SKIP_UT_WITH_DFLOW=0 DFLOW_DEBUG=1 coverage run --source=./dpgen2 -m unittest && coverage report
Expand Down
2 changes: 0 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
FROM dptechnology/dflow:latest

WORKDIR /data/dpgen2
ADD requirements.txt ./
RUN pip install -r requirements.txt
COPY ./ ./
RUN pip install .
54 changes: 54 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
[build-system]
requires = ["setuptools>=45", "setuptools_scm[toml]>=6.2"]
build-backend = "setuptools.build_meta"

[project]
name = "dpgen2"
dynamic = ["version"]
description = "DPGEN2: concurrent learning workflow generating the machine learning potential energy models."
authors = [
{name = "DeepModeling"},
]
license = {file = "LICENSE"}
classifiers = [
"Programming Language :: Python :: 3.7",
"License :: OSI Approved :: GNU Lesser General Public License v3 (LGPLv3)",
]
dependencies = [
'numpy',
'dpdata',
'pydflow>=1.5.10',
'dargs>=0.3.1',
]
requires-python = ">=3.7"
readme = "README.md"
keywords = ["deep potential", "concurrent learning", "work flow"]

[project.urls]
Homepage = "https://github.com/deepmodeling/dpgen2"
documentation = "https://docs.deepmodeling.com/projects/dpgen2"
repository = "https://github.com/deepmodeling/dpgen2"

[project.entry-points.console_scripts]
dpgen2 = "dpgen2.entrypoint.main:main"

[project.optional-dependencies]
docs = [
'sphinx',
'recommonmark',
'sphinx_rtd_theme>=1.0.0rc1',
'numpydoc',
'myst_parser',
'deepmodeling_sphinx',
'sphinx-argparse',
"dargs>=0.3.1",
]

[tool.setuptools.packages.find]
include = ["dpgen2*"]

[tool.setuptools.package-data]
dpgen2 = ['*.json']

[tool.setuptools_scm]
write_to = "dpgen2/_version.py"
5 changes: 0 additions & 5 deletions requirements.txt

This file was deleted.

64 changes: 0 additions & 64 deletions setup.py

This file was deleted.

0 comments on commit 2f6643e

Please sign in to comment.