Skip to content

Commit

Permalink
modify setup.py and publish script (#162)
Browse files Browse the repository at this point in the history
* remove setup.py, refactor publish script, fix opsdata link
  • Loading branch information
d-chambers authored Feb 24, 2020
1 parent d319514 commit 26e0730
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
2 changes: 1 addition & 1 deletion docs/notebooks/intro.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
10 changes: 10 additions & 0 deletions scripts/publish_new_version.py
Original file line number Diff line number Diff line change
@@ -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)
1 change: 0 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
Expand Down

0 comments on commit 26e0730

Please sign in to comment.