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

401: Migrate install to pyproject.toml #414

Merged
merged 4 commits into from
Nov 20, 2024
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
8 changes: 0 additions & 8 deletions .coveragerc

This file was deleted.

4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ For information about the support provided for releases, see our [Release Suppor
Instructions for installing the metcalcpy package locally
---------------------------------------------------------
- activate your conda environment (i.e. 'conda activate your-conda-env-name')
- from within your active conda environment, cd to the METcalcpy/ directory, where you will see the setup.py script
- from within your active conda environment, cd to the METcalcpy/ directory, where you will see the file pyproject.toml
- from this directory, run the following on the command line: pip install -e .
- the -e option stands for editable, which is useful in that you can update your METcalcpy/metcalcpy source without reinstalling it
- the . indicates that you should search the current directory for the setup.py script
- the . indicates that you should search the current directory for the pyproject.toml file.

- use metcalcpy package via import statement:
- Examples:
Expand Down
2 changes: 1 addition & 1 deletion docs/Users_Guide/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ METcalcpy source code, e.g. `/User/someuser/METcalcpy`. From this directory, ru

`pip install -e .`

This instructs pip to install the package based on instructios in the setup.py file located in the current directory
This instructs pip to install the package based on instructios in the pyproject.toml file located in the current directory
(as indicated by the '.'). The `-e` directs pip to install the package in edit mode, so if one wishes to make changes
to this source code, the changes are automatically applied without the need to re-install the package.

Expand Down
2 changes: 1 addition & 1 deletion docs/version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__="3.0.0-dev"
3.0.0-rc1-dev
62 changes: 62 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
[build-system]
requires = [
"setuptools",
"wheel",
"setuptools-git-versioning>=2.0,<3",
]
build-backend = "setuptools.build_meta"

[project]
name = "metcalcpy"
dynamic = ["version", "dependencies"]
description = "statistics and util package for METplus"
authors = [
{name = "METplus"},
]
requires-python = ">=3.10.4"
readme = "README.md"
license = {text = "MIT"}
classifiers = [
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3",
]

[project.urls]
Homepage = "https://github.com/dtcenter/METcalcpy"

[tool.setuptools.packages]
find = {include = ["metcalcpy*"]}

[tool.setuptools.package-data]
metplus = [
"docs/version"
]

[tool.setuptools.exclude-package-data]
metplus = ["README", "__pycache__", "*~"]

[tool.setuptools.dynamic]
dependencies = {file = ["requirements.txt"]}

[tool.setuptools-git-versioning]
enabled = true
version_file = "docs/version"

[tool.pytest.ini_options]
testpaths = ["test"]

[tool.coverage.run]
source = ["metcalcpy"]
omit = [
"config.py",
"config-3.py",
"metcalcpy/contributed/*",
]
relative_files = true

[tool.coverage.report]
exclude_also = [
"def __repr__",
"if __name__ == .__main__.:",
]
29 changes: 0 additions & 29 deletions setup.py

This file was deleted.

Loading