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

Feature #461 move to pyproject.toml #462

Merged
merged 2 commits into from
Sep 18, 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
22 changes: 22 additions & 0 deletions docs/Users_Guide/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,28 @@ file at the top level of the repository.

.. literalinclude:: ../../requirements.txt

Install METplotpy
-------------------

METplotpy can be installed into a conda environment. First navigate to the
base directory, then run the following commands.

.. code-block:: ini
$ conda create -n "metplotpy" python=3.10.4 pip
$ conda activate metplotpy
(metplotpy)$ pip install -e .
This will install METplotpy into the conda env, along with all the dependancies
listed above in **requirements.txt**.

If you already have an environment setup, or want to install METplotpy without
the dependancies, add the `--no-deps` argument to pip.

.. code-block:: ini
$ pip install -e . --no-deps
.. _METcalcpy_conda:

Install METcalcpy in the Conda Environment
Expand Down
4 changes: 2 additions & 2 deletions internal/scripts/sonarqube/sonar-project.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ sonar.projectKey=METplotpy
sonar.projectName=METplotpy
sonar.projectVersion=SONAR_PROJECT_VERSION
sonar.branch.name=SONAR_BRANCH_NAME
sonar.sources=metplotpy,test
sonar.coverage.exclusions=test/**
sonar.sources=metplotpy
sonar.coverage.exclusions=test/**,contributed/**
sonar.python.coverage.reportPaths=coverage.xml
sonar.sourceEncoding=UTF-8

Expand Down
7 changes: 7 additions & 0 deletions metplotpy/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
from distutils.util import convert_path

main_ns = {}
version_path = convert_path('docs/version')
with open(version_path) as version_file:
exec(version_file.read(), main_ns)
__version__ = main_ns['__version__']
35 changes: 35 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
[build-system]
requires = ["setuptools"]
build-backend = "setuptools.build_meta"

[project]
name = "metplotpy"
dynamic = ["version", "dependencies"]
description = "plotting package for METplus"
authors = [
{name = "METplus", email = "[email protected]"},
]
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/METplotpy"

[tool.setuptools.dynamic]
version = {attr = "metplotpy.__version__"}
dependencies = {file = ["requirements.txt"]}

[tool.setuptools]
packages = ["metplotpy"]

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

[tool.coverage.run]
source = ["metplotpy/plots"]
29 changes: 0 additions & 29 deletions setup.py

This file was deleted.