diff --git a/README.rst b/README.rst index 626465b..b0d3c42 100644 --- a/README.rst +++ b/README.rst @@ -7,17 +7,19 @@ LimeTr :code:`limetr`, read as "lime tree", is a Python package solves mixed effects models with linear random effects. Moreover the package also provides robust regression option called "trimming". -Install -------- +Installation +------------ -The package can be installed through ``pip``, +``limetr>=0.1.0`` requires python 3.10 or higher, it can be install via -.. code-block:: bash +.. code:: bash - pip install limetr + pip install limetr>=0.1.0 -Or you could install from source, by clone this repository and do, +For developers, you can clone the repository and install the package in the development mode. -.. code-block:: bash +.. code:: bash - python setup.py install + git clone https://kgithub.com/zhengp0/xspline.git + cd xspline + pip install -e ".[test,docs]" diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..9b03839 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,28 @@ +[build-system] +requires = ["setuptools"] +build-backend = "setuptools.build_meta" + +[project] +name = "limetr" +version = "0.1.1" +description = "Robust linear mixed effects model" +readme = "REDME.rst" +requires-python = ">=3.10" +license = { file = "LICENSE" } +authors = [ + { name = "IHME Math Sciences", email = "ihme.math.sciences@gmail.com" }, +] +dependencies = ["numpy>=1.25.1", "scipy>=1.11.1", "matplotlib>=3.7.2", "spmat<0.1.0"] + +[project.optional-dependencies] +test = ["pytest", "pytest-cov"] +docs = ["sphinx", "sphinx-autodoc-typehints", "furo"] + +[project.urls] +github = "https://github.com/zhengp0/limetr" + +[tool.sphinx] +project = "limetr" +author = "IHME Math Sciences" +copyright = "2023, IHME Math Sciences" +version = "0.1.1" \ No newline at end of file diff --git a/setup.py b/setup.py deleted file mode 100644 index 1ae2eb2..0000000 --- a/setup.py +++ /dev/null @@ -1,52 +0,0 @@ -import sys -from pathlib import Path -from setuptools import setup, find_packages - - -if __name__ == '__main__': - base_dir = Path(__file__).parent - src_dir = base_dir/'src'/'limetr' - - sys.path.insert(0, src_dir.as_posix()) - import __about__ as about - - with (base_dir/'README.rst').open() as f: - long_description = f.read() - - install_requirements = [ - 'numpy', - 'scipy', - 'spmat', - 'matplotlib' - ] - - test_requirements = [ - 'pytest', - 'pytest-mock', - ] - - doc_requirements = [] - - setup(name=about.__title__, - version=about.__version__, - - description=about.__summary__, - long_description=long_description, - license=about.__license__, - url=about.__uri__, - - author=about.__author__, - author_email=about.__email__, - - package_dir={'': 'src'}, - packages=find_packages(where='src'), - include_package_data=True, - - install_requires=install_requirements, - tests_require=test_requirements, - extras_require={ - 'docs': doc_requirements, - 'test': test_requirements, - 'dev': doc_requirements + test_requirements - }, - zip_safe=False,) diff --git a/src/limetr/__about__.py b/src/limetr/__about__.py deleted file mode 100644 index 6ec36bb..0000000 --- a/src/limetr/__about__.py +++ /dev/null @@ -1,16 +0,0 @@ -__all__ = [ - "__title__", "__summary__", "__uri__", "__version__", "__author__", - "__email__", "__license__", "__copyright__", -] - -__title__ = "limetr" -__summary__ = "limetr: linear mixed effects model with trimming." -__uri__ = "https://github.com/zhengp0/limetr" - -__version__ = "0.1.1" - -__author__ = "Peng Zheng" -__email__ = "zhengp@uw.eud" - -__license__ = "MIT License" -__copyright__ = f"Copyright 2020 {__author__}"