From 26e07306ce94ac19aed0f6701bfd684ad2b330ee Mon Sep 17 00:00:00 2001 From: Derrick Date: Mon, 24 Feb 2020 11:12:31 -0800 Subject: [PATCH] modify setup.py and publish script (#162) * remove setup.py, refactor publish script, fix opsdata link --- docs/notebooks/intro.ipynb | 2 +- scripts/publish_new_version.py | 10 ++++++++++ setup.py | 1 - 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/docs/notebooks/intro.ipynb b/docs/notebooks/intro.ipynb index 1f394202..ac1eae17 100644 --- a/docs/notebooks/intro.ipynb +++ b/docs/notebooks/intro.ipynb @@ -59,7 +59,7 @@ " \n", "## 4. Datasets\n", "\n", - "Often seismology codes benefit from a complete set of station, event, and waveform data for testing and demonstration. ObsPlus provides a few interesting (at least to the authors) datasets. Moreover, In only a few minutes, you can make your own research datasets pip installable using the [dataset template](https://github.com/seismopy/opsdata).\n", + "Often seismology codes benefit from a complete set of station, event, and waveform data for testing and demonstration. ObsPlus provides a few interesting (at least to the authors) datasets. Moreover, In only a few minutes, you can make your own research datasets pip installable using the [dataset template](https://github.com/niosh-mining/opsdata).\n", " \n", "- [A tour of obsplus datasets](./datasets/datasets.ipynb), used for testing and documentation.\n", "\n", diff --git a/scripts/publish_new_version.py b/scripts/publish_new_version.py index c7442573..98524973 100644 --- a/scripts/publish_new_version.py +++ b/scripts/publish_new_version.py @@ -1,11 +1,21 @@ """ A script to publush a new version of Obsplus to pypi. """ +import shutil from pathlib import Path from subprocess import run if __name__ == "__main__": base = Path(__file__).parent.parent + # clear out old build/dist paths + build_path = base / "build" + dist_path = base / "dist" + for path in [build_path, dist_path]: + if path.is_dir(): + shutil.rmtree(path) + run("python setup.py sdist bdist_wheel", shell=True, cwd=base) run("twine upload dist/*", shell=True, cwd=base) + test_pypi_url = "--repository-url https://test.pypi.org/legacy/" + # run("twine upload {test_pypi_url} dist/*", shell=True, cwd=base) diff --git a/setup.py b/setup.py index daf3f2b4..968f82c4 100644 --- a/setup.py +++ b/setup.py @@ -127,7 +127,6 @@ def load_file(path): test_suite="tests", install_requires=read_requirements(package_req_path), tests_require=tests_require, - setup_requires=["pytest-runner>=2.0"], extras_require={"dev": dev_requires}, python_requires=">=%s" % python_version_str, cmdclass=versioneer.get_cmdclass(),