diff --git a/.github/workflows/ci_tests.yaml b/.github/workflows/ci_tests.yaml index 0ac19e209a4..ce3a7717219 100644 --- a/.github/workflows/ci_tests.yaml +++ b/.github/workflows/ci_tests.yaml @@ -79,7 +79,7 @@ jobs: # Install GMT and other required dependencies from conda-forge - name: Install dependencies - run: conda env update --file environment.yml + run: conda install gmt=6.1.1 make poetry # Show installed pkg information for postmortem diagnostic - name: List installed packages @@ -105,9 +105,7 @@ jobs: # Install the package that we want to test - name: Install the package - run: | - python setup.py sdist --formats=zip - pip install dist/* + run: poetry install --extras docs # Run the tests - name: Test with pytest diff --git a/.gitignore b/.gitignore index 7e3800a3b1c..0d08c70ef29 100644 --- a/.gitignore +++ b/.gitignore @@ -11,6 +11,7 @@ dist/ *.egg-info/ .eggs/ MANIFEST +poetry.lock # Unit test / coverage reports .cache diff --git a/pyproject.toml b/pyproject.toml index b147a80a911..3f7223ae519 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,3 +1,47 @@ +[tool.poetry] +name = "pygmt" +version = "0.3.1" +description = "A Python interface for the Generic Mapping Tools" +authors = ["The PyGMT Developers"] +license = "BSD License" + +[tool.poetry.dependencies] +myst-parser = {version = "*", optional = true} +netCDF4 = "*" +numpy = "*" +packaging = "*" +pandas = "*" +python = "^3.7" +sphinx = {version = "*", optional = true} +sphinx-copybutton = {version = "*", optional = true} +sphinx-gallery = {version = "*", optional = true} +sphinx_rtd_theme = {version = "0.4.3", optional = true} +xarray = "*" + +[tool.poetry.dev-dependencies] +black = "*" +blackdoc = "*" +codecov = "*" +coverage = {extras = ["toml"], version = "*"} +docformatter = "*" +flake8 = "*" +ipython = "*" +isort = ">=5" +jupyter = "*" +make = "*" +matplotlib = "*" +pylint = "*" +pytest-cov = "*" +pytest-mpl = "*" +pytest = ">=6.0" + +[tool.poetry.extras] +docs = ["myst-parser", "sphinx", "sphinx-copybutton", "sphinx-gallery", "sphinx_rtd_theme"] + +[build-system] +requires = ["poetry-core>=1.0.0"] +build-backend = "poetry.core.masonry.api" + [tool.coverage.run] omit = ["*/tests/*", "*pygmt/__init__.py"]