Skip to content
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
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ repos:
- --exclude=docs/
- --exclude=scripts/
- --exclude=binder/
- --exclude=versioneer.py
- --exclude=pymc/_version.py
- --last-year-present
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.11.13
Expand Down
1 change: 0 additions & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
include requirements.txt
include *.md *.rst
include scripts/*.sh
include LICENSE
2 changes: 1 addition & 1 deletion docs/source/contributing/pr_tutorial.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ The preferred workflow for contributing to PyMC is to fork the [GitHub repositor
Always use a ``feature`` branch. It's good practice to never routinely work on the ``main`` branch of any repository.
:::

1. Project requirements are in ``requirements.txt``, and libraries used for development are in ``requirements-dev.txt``.
1. Project requirements are in ``pyproject.toml``, and libraries used for development are in ``requirements-dev.txt``.
The easiest (and recommended) way to set up a development environment is via [miniconda](https://docs.conda.io/en/latest/miniconda.html):

::::{tab-set}
Expand Down
14 changes: 0 additions & 14 deletions pymc/_version.py
Original file line number Diff line number Diff line change
@@ -1,17 +1,3 @@
# Copyright 2024 - present The PyMC Developers
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# This file helps to compute a version number in source trees obtained from
# git-archive tarball (such as those provided by githubs download-from-tag
# feature). Distribution tarballs (built by setup.py sdist) and build
Expand Down
55 changes: 54 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,60 @@
[build-system]
requires = ["setuptools", "versioneer[toml]==0.29"]
requires = ["setuptools>=77", "versioneer[toml]==0.29"]
build-backend = "setuptools.build_meta"

[project]
name = "pymc"
dynamic = ["version"]
requires-python = ">=3.12,<3.15"
authors = [{ name = "PyMC Developers", email = "pymc.devs@gmail.com" }]
description = "Probabilistic Programming in Python: Bayesian Modeling and Probabilistic Machine Learning with PyTensor"
readme = "README.rst"
license = "Apache-2.0"
license-files = ["LICENSE"]
classifiers = [
"Development Status :: 5 - Production/Stable",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
"Intended Audience :: Science/Research",
"Topic :: Scientific/Engineering",
"Topic :: Scientific/Engineering :: Mathematics",
"Operating System :: OS Independent",
]
keywords = [
"statistics",
"modelling",
"inference",
"probabilistic-programming",
"bayesian-inference",
"science",
]
dependencies = [

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

one more place to update dependencies :)

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

One different place rather, because this removes requirements.txt!

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I don't see it excluded? nor the -devs one? Happy if they can go

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Damn, sorry, bad rebase. Now it is.
The requirements-devs.txt is another problem because it is auto-generated from the conda env. I think it can be tackled in its own time

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

seems to only be used for binder... would be nice to get rid of it next yeah

"arviz>=1.1.0,<2.0",
"cachetools>=4.2.1,<7",
"cloudpickle",
"numpy>=1.25.0",
"pandas>=0.24.0",
"pytensor>=3.2.2,<3.4",
"rich>=13.7.1",
"scipy>=1.4.1",
"threadpoolctl>=3.1.0,<4.0.0",
"typing-extensions>=3.7.4",
]

[project.optional-dependencies]
nutpie = [
"nutpie>=0.16.10,<1",
]

[project.urls]
repository = "http://github.com/pymc-devs/pymc"

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

[tool.pytest.ini_options]
testpaths = ["tests"]
minversion = "6.0"
Expand Down
10 changes: 0 additions & 10 deletions requirements.txt

This file was deleted.

72 changes: 6 additions & 66 deletions setup.py
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2024 - present The PyMC Developers
# Copyright 2026 - present The PyMC Developers
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand All @@ -11,71 +11,11 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.


from codecs import open
from os.path import dirname, join, realpath

import versioneer

from setuptools import find_packages, setup

DESCRIPTION = "Probabilistic Programming in Python: Bayesian Modeling and Probabilistic Machine Learning with PyTensor"
AUTHOR = "PyMC Developers"
AUTHOR_EMAIL = "pymc.devs@gmail.com"
URL = "http://github.com/pymc-devs/pymc"
LICENSE = "Apache License, Version 2.0"

classifiers = [
"Development Status :: 5 - Production/Stable",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
"License :: OSI Approved :: Apache Software License",
"Intended Audience :: Science/Research",
"Topic :: Scientific/Engineering",
"Topic :: Scientific/Engineering :: Mathematics",
"Operating System :: OS Independent",
]

PROJECT_ROOT = dirname(realpath(__file__))

# Get the long description from the README file
with open(join(PROJECT_ROOT, "README.rst"), encoding="utf-8") as buff:
LONG_DESCRIPTION = buff.read()

REQUIREMENTS_FILE = join(PROJECT_ROOT, "requirements.txt")

with open(REQUIREMENTS_FILE) as f:
install_reqs = f.read().splitlines()

test_reqs = ["pytest", "pytest-cov"]

extras_require = {
"nutpie": ["nutpie>=0.16.10,<1"],
}
Comment thread
ricardoV94 marked this conversation as resolved.
from setuptools import setup

if __name__ == "__main__":
setup(
name="pymc",
version=versioneer.get_version(),
cmdclass=versioneer.get_cmdclass(),
maintainer=AUTHOR,
maintainer_email=AUTHOR_EMAIL,
description=DESCRIPTION,
license=LICENSE,
url=URL,
long_description=LONG_DESCRIPTION,
long_description_content_type="text/x-rst",
packages=find_packages(exclude=["tests*"]),
# because of an upload-size limit by PyPI, we're temporarily removing docs from the tarball.
# Also see MANIFEST.in
# package_data={'docs': ['*']},
classifiers=classifiers,
python_requires=">=3.12",
install_requires=install_reqs,
extras_require=extras_require,
tests_require=test_reqs,
)
setup(
version=versioneer.get_version(),
cmdclass=versioneer.get_cmdclass(),
)
Loading