diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md index 400ce6d..7061eca 100644 --- a/.github/ISSUE_TEMPLATE.md +++ b/.github/ISSUE_TEMPLATE.md @@ -1,4 +1,4 @@ -* sade version: +* smops version: * Python version: * Operating System: diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 0db6362..2d273d5 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -20,8 +20,8 @@ jobs: python-vresion: ${{ matrix.python-version }} - name: Display Python version run: python -c "import sys; print(sys.version)" - - name: Install sade + - name: Install smops run: | python -m pip install --upgrade pip pip install . - sade -v \ No newline at end of file + smops -v \ No newline at end of file diff --git a/CONTRIBUTING.rst b/CONTRIBUTING.rst index b89d6d9..c0c3b9b 100644 --- a/CONTRIBUTING.rst +++ b/CONTRIBUTING.rst @@ -15,7 +15,7 @@ Types of Contributions Report Bugs ~~~~~~~~~~~ -Report bugs at https://github.com/mulan-94/sade/issues. +Report bugs at https://github.com/mulan-94/smops/issues. If you are reporting a bug, please include: @@ -38,14 +38,14 @@ and "help wanted" is open to whoever wants to implement it. Write Documentation ~~~~~~~~~~~~~~~~~~~ -sade could always use more documentation, whether as part of the -official sade docs, in docstrings, or even on the web in blog posts, +smops could always use more documentation, whether as part of the +official smops docs, in docstrings, or even on the web in blog posts, articles, and such. Submit Feedback ~~~~~~~~~~~~~~~ -The best way to send feedback is to file an issue at https://github.com/mulan-94/sade/issues. +The best way to send feedback is to file an issue at https://github.com/mulan-94/smops/issues. If you are proposing a feature: @@ -57,17 +57,17 @@ If you are proposing a feature: Get Started! ------------ -Ready to contribute? Here's how to set up `sade` for local development. +Ready to contribute? Here's how to set up `smops` for local development. -1. Fork the `sade` repo on GitHub. +1. Fork the `smops` repo on GitHub. 2. Clone your fork locally:: - $ git clone git@github.com:your_name_here/sade.git + $ git clone git@github.com:your_name_here/smops.git 3. Install your local copy into a virtualenv. Assuming you have virtualenvwrapper installed, this is how you set up your fork for local development:: - $ mkvirtualenv sade - $ cd sade/ + $ mkvirtualenv smops + $ cd smops/ $ python setup.py develop 4. Create a branch for local development:: @@ -79,7 +79,7 @@ Ready to contribute? Here's how to set up `sade` for local development. 5. When you're done making changes, check that your changes pass flake8 and the tests, including testing other Python versions with tox:: - $ flake8 sade tests + $ flake8 smops tests $ python setup.py test or pytest $ tox @@ -103,7 +103,7 @@ Before you submit a pull request, check that it meets these guidelines: your new functionality into a function with a docstring, and add the feature to the list in README.rst. 3. The pull request should work for Python 3.5, 3.6, 3.7 and 3.8, and for PyPy. Check - https://travis-ci.com/mulan-94/sade/pull_requests + https://travis-ci.com/mulan-94/smops/pull_requests and make sure that the tests pass for all supported Python versions. Tips @@ -111,7 +111,7 @@ Tips To run a subset of tests:: -$ pytest tests.test_sade +$ pytest tests.test_smops Deploying diff --git a/HISTORY.rst b/HISTORY.rst index 54106e0..f502964 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -4,7 +4,6 @@ History 0.1.2 (2022-09-14) ------------------ -* Change name from smops to sade * Added `output-prefix` argument * Removed `output-dir` argument diff --git a/Makefile b/Makefile index bfaffd0..342085a 100644 --- a/Makefile +++ b/Makefile @@ -48,7 +48,7 @@ clean-test: ## remove test and coverage artifacts rm -fr .pytest_cache lint/flake8: ## check style with flake8 - flake8 sade tests + flake8 smops tests lint: lint/flake8 ## check style @@ -59,15 +59,15 @@ test-all: ## run tests on every Python version with tox tox coverage: ## check code coverage quickly with the default Python - coverage run --source sade -m pytest + coverage run --source smops -m pytest coverage report -m coverage html $(BROWSER) htmlcov/index.html docs: ## generate Sphinx HTML documentation, including API docs - rm -f docs/sade.rst + rm -f docs/smops.rst rm -f docs/modules.rst - sphinx-apidoc -o docs/ sade + sphinx-apidoc -o docs/ smops $(MAKE) -C docs clean $(MAKE) -C docs html $(BROWSER) docs/_build/html/index.html diff --git a/README.rst b/README.rst index aa40c81..bb4035e 100644 --- a/README.rst +++ b/README.rst @@ -1,24 +1,24 @@ ===== -sade +smops ===== -.. image:: https://img.shields.io/pypi/v/sade.svg - :target: https://pypi.python.org/pypi/sade +.. image:: https://img.shields.io/pypi/v/smops.svg + :target: https://pypi.python.org/pypi/smops -sade (aka Smooth Operator) is a python package for interpolating channelised FITS model images onto user-specified higher resolution frequency grid. For example, you can give sade a set of 4 per-subband model FITS images, and ask it to return 16 model images, which can then be fed back into e.g. wsclean_ for a predict operation. Usage: +smops (aka Smooth Operator) is a python package for interpolating channelised FITS model images onto user-specified higher resolution frequency grid. For example, you can give smops a set of 4 per-subband model FITS images, and ask it to return 16 model images, which can then be fed back into e.g. wsclean_ for a predict operation. Usage: .. code-block:: bash - sade --ms /ms/used/togen/images.ms -ip prefix-used-for-those-images -co 16 -order 4 + smops --ms /ms/used/togen/images.ms -ip prefix-used-for-those-images -co 16 -order 4 Its options are: .. code-block:: python - usage: sade [-h] [-v] [-op] [-j] [-s] [-mem] -ms -ip -co [-order] + usage: smops [-h] [-v] [-op] [-j] [-s] [-mem] -ms -ip -co [-order] Refine model images in frequency diff --git a/setup.cfg b/setup.cfg index 6a38605..ace1794 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,13 +1,13 @@ # https://setuptools.pypa.io/en/latest/userguide/declarative_config.html? # https://setuptools.pypa.io/en/latest/references/keywords.html [metadata] - name = sade - version = attr: sade.VERSION + name = smops + version = attr: smops.VERSION author = L. Andati email = landati@duck.com description = Python script for interpolating FITS model images over frequency long_description = file: README.rst, CHANGELOG.rst, LICENSE.rst - keywords = sade, model frequency interpolation, FITS images + keywords = smops, model frequency interpolation, FITS images license = MIT license license_files = file: LICENSE.rst url = https://github.com/mulan-94/smops diff --git a/setup.py b/setup.py index ed2a81a..4d2a125 100644 --- a/setup.py +++ b/setup.py @@ -8,8 +8,8 @@ setup( entry_points={ 'console_scripts': [ - 'sade=sade.smooth:main', + 'smops=smops.smooth:main', ], }, - packages=find_packages(include=['sade', 'sade.*']), + packages=find_packages(include=['smops', 'smops.*']), ) diff --git a/sade/__init__.py b/smops/__init__.py similarity index 75% rename from sade/__init__.py rename to smops/__init__.py index 8962c62..604ee99 100644 --- a/sade/__init__.py +++ b/smops/__init__.py @@ -1,4 +1,4 @@ -"""Top-level package for sade.""" +"""Top-level package for smops.""" __author__ = AUTHOR = """L Andati""" __email__ = EMAIL = 'landati@duck.com' diff --git a/sade/smooth.py b/smops/smooth.py similarity index 98% rename from sade/smooth.py rename to smops/smooth.py index 3ffc092..ad59464 100644 --- a/sade/smooth.py +++ b/smops/smooth.py @@ -17,7 +17,7 @@ from dask import compute -from sade import VERSION +from smops import VERSION GB = 2**30 @@ -32,7 +32,7 @@ def configure_logger(out_dir="."): os.makedirs(out_dir) l_handler = logging.FileHandler( - os.path.join(out_dir, "sade.log"), mode="w") + os.path.join(out_dir, "smops.log"), mode="w") l_handler.setLevel(logging.INFO) l_handler.setFormatter(formatter) @@ -40,7 +40,7 @@ def configure_logger(out_dir="."): s_handler.setLevel(logging.INFO) s_handler.setFormatter(formatter) - logger = logging.getLogger("sade") + logger = logging.getLogger("smops") logger.setLevel(logging.INFO) logger.addHandler(l_handler) @@ -52,10 +52,10 @@ def get_arguments(): parser = argparse.ArgumentParser(description="Refine model images in frequency") parser.add_argument("-v", "--version", action='version', version=f'%(prog)s {VERSION}') # parser.add_argument("-od", "--output-dir", dest="output_dir", - # default="sade-output", metavar="", + # default="smops-output", metavar="", # help="Where to put the output files.") parser.add_argument("-op", "--output-prefix", dest="output_pref", - default="sade-interp-model", metavar="", + default="smops-interp-model", metavar="", help="What to prefix the new interpolated model name with.") parser.add_argument("-j", "--num-threads", dest="nthreads", default=10, metavar="", type=int, help="Number of threads to use while writing out output images") diff --git a/tox.ini b/tox.ini index 6e03bf8..f877d9e 100644 --- a/tox.ini +++ b/tox.ini @@ -10,7 +10,7 @@ python = [testenv:flake8] basepython = python deps = flake8 -commands = flake8 sade tests +commands = flake8 smops tests [testenv] setenv =