Skip to content

Commit

Permalink
Migrating to sade
Browse files Browse the repository at this point in the history
  • Loading branch information
Mulan-94 committed Sep 14, 2022
1 parent 4af3ead commit 9497888
Show file tree
Hide file tree
Showing 10 changed files with 34 additions and 34 deletions.
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
* smops version:
* sade version:
* Python version:
* Operating System:

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ jobs:
python-vresion: ${{ matrix.python-version }}
- name: Display Python version
run: python -c "import sys; print(sys.version)"
- name: Install smops
- name: Install sade
run: |
python -m pip install --upgrade pip
pip install .
smops -v
sade -v
24 changes: 12 additions & 12 deletions CONTRIBUTING.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Types of Contributions
Report Bugs
~~~~~~~~~~~

Report bugs at https://github.com/mulan-94/smops/issues.
Report bugs at https://github.com/mulan-94/sade/issues.

If you are reporting a bug, please include:

Expand All @@ -38,14 +38,14 @@ and "help wanted" is open to whoever wants to implement it.
Write Documentation
~~~~~~~~~~~~~~~~~~~

smops could always use more documentation, whether as part of the
official smops docs, in docstrings, or even on the web in blog posts,
sade could always use more documentation, whether as part of the
official sade 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/smops/issues.
The best way to send feedback is to file an issue at https://github.com/mulan-94/sade/issues.

If you are proposing a feature:

Expand All @@ -57,17 +57,17 @@ If you are proposing a feature:
Get Started!
------------

Ready to contribute? Here's how to set up `smops` for local development.
Ready to contribute? Here's how to set up `sade` for local development.

1. Fork the `smops` repo on GitHub.
1. Fork the `sade` repo on GitHub.
2. Clone your fork locally::

$ git clone [email protected]:your_name_here/smops.git
$ git clone [email protected]:your_name_here/sade.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 smops
$ cd smops/
$ mkvirtualenv sade
$ cd sade/
$ python setup.py develop

4. Create a branch for local development::
Expand All @@ -79,7 +79,7 @@ Ready to contribute? Here's how to set up `smops` 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 smops tests
$ flake8 sade tests
$ python setup.py test or pytest
$ tox

Expand All @@ -103,15 +103,15 @@ 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/smops/pull_requests
https://travis-ci.com/mulan-94/sade/pull_requests
and make sure that the tests pass for all supported Python versions.

Tips
----

To run a subset of tests::

$ pytest tests.test_smops
$ pytest tests.test_sade


Deploying
Expand Down
8 changes: 4 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ clean-test: ## remove test and coverage artifacts
rm -fr .pytest_cache

lint/flake8: ## check style with flake8
flake8 smops tests
flake8 sade tests

lint: lint/flake8 ## check style

Expand All @@ -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 smops -m pytest
coverage run --source sade -m pytest
coverage report -m
coverage html
$(BROWSER) htmlcov/index.html

docs: ## generate Sphinx HTML documentation, including API docs
rm -f docs/smops.rst
rm -f docs/sade.rst
rm -f docs/modules.rst
sphinx-apidoc -o docs/ smops
sphinx-apidoc -o docs/ sade
$(MAKE) -C docs clean
$(MAKE) -C docs html
$(BROWSER) docs/_build/html/index.html
Expand Down
12 changes: 6 additions & 6 deletions README.rst
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
=====
smops
sade
=====


.. image:: https://img.shields.io/pypi/v/smops.svg
:target: https://pypi.python.org/pypi/smops
.. image:: https://img.shields.io/pypi/v/sade.svg
:target: https://pypi.python.org/pypi/sade


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:
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:

.. code-block:: bash
smops --ms /ms/used/togen/images.ms -ip prefix-used-for-those-images -co 16 -order 4
sade --ms /ms/used/togen/images.ms -ip prefix-used-for-those-images -co 16 -order 4
Its options are:

.. code-block:: python
usage: smops [-h] [-v] [-op] [-j] [-s] [-mem] -ms -ip -co [-order]
usage: sade [-h] [-v] [-op] [-j] [-s] [-mem] -ms -ip -co [-order]
Refine model images in frequency
Expand Down
2 changes: 1 addition & 1 deletion smops/__init__.py → sade/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
"""Top-level package for smops."""
"""Top-level package for sade."""

__author__ = AUTHOR = """L Andati"""
__email__ = EMAIL = '[email protected]'
Expand Down
2 changes: 1 addition & 1 deletion smops/smooth.py → sade/smooth.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@


from dask import compute
from smops import VERSION
from sade import VERSION


GB = 2**30
Expand Down
8 changes: 4 additions & 4 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
# https://setuptools.pypa.io/en/latest/userguide/declarative_config.html?
# https://setuptools.pypa.io/en/latest/references/keywords.html
[metadata]
name = smops
version = attr: smops.VERSION
name = sade
version = attr: sade.VERSION
author = L. Andati
email = [email protected]
description = Python script for interpolating FITS model images over frequency
long_description = file: README.rst, CHANGELOG.rst, LICENSE.rst
keywords = smops, model frequency interpolation, FITS images
keywords = sade, model frequency interpolation, FITS images
license = MIT license
license_files = file: LICENSE.rst
url = https://github.com/mulan-94/smops
url = https://github.com/mulan-94/sade
python_requires = >=3.8
classifiers=
Development Status :: 4 - Beta
Expand Down
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
setup(
entry_points={
'console_scripts': [
'smops=smops.smooth:main',
'sade=sade.smooth:main',
],
},
packages=find_packages(include=['smops', 'smops.*']),
packages=find_packages(include=['sade', 'sade.*']),
)
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ python =
[testenv:flake8]
basepython = python
deps = flake8
commands = flake8 smops tests
commands = flake8 sade tests

[testenv]
setenv =
Expand Down

0 comments on commit 9497888

Please sign in to comment.