Skip to content

Commit

Permalink
Merge pull request #20 from sfarrens/format_fix
Browse files Browse the repository at this point in the history
PyPi release
  • Loading branch information
austinpeel authored Sep 7, 2020
2 parents ca3b618 + 097f304 commit 6e882b6
Show file tree
Hide file tree
Showing 5 changed files with 156 additions and 31 deletions.
143 changes: 132 additions & 11 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,17 +1,138 @@
# Ignore Python compilation
*.pyc
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class

# Ignore cache
*.cache/
# C extensions
*.so

# Ignore coverage tests
# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
share/python-wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST

# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec

# Installer logs
pip-log.txt
pip-delete-this-directory.txt

# Unit test / coverage reports
htmlcov/
.tox/
.nox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
*.py,cover
.hypothesis/
.pytest_cache/
cover/

# Ignore installation
.eggs/
dist/
build/
# Translations
*.mo
*.pot

# Django stuff:
*.log
local_settings.py
db.sqlite3
db.sqlite3-journal

# Flask stuff:
instance/
.webassets-cache

# Scrapy stuff:
.scrapy

# Sphinx documentation
docs/_build/

# PyBuilder
.pybuilder/
target/

# Jupyter Notebook
.ipynb_checkpoints

# IPython
profile_default/
ipython_config.py

# pyenv
# For a library or package, you might want to ignore these files since the code is
# intended to run in multiple environments; otherwise, check them in:
# .python-version

# pipenv
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
# However, in case of collaboration, if having platform-specific dependencies or dependencies
# having no cross-platform support, pipenv may install dependencies that don't work, or not
# install all needed dependencies.
#Pipfile.lock

# PEP 582; used by e.g. github.com/David-OConnor/pyflow
__pypackages__/

# Celery stuff
celerybeat-schedule
celerybeat.pid

# SageMath parsed files
*.sage.py

# Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/

# Spyder project settings
.spyderproject
.spyproject

# Rope project settings
.ropeproject

# mkdocs documentation
/site

# mypy
.mypy_cache/
.dmypy.json
dmypy.json

# Pyre type checker
.pyre/

# pytype static type analyzer
.pytype/

# Ignore pypi config
.pypirc
# Cython debug symbols
cython_debug/
16 changes: 8 additions & 8 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ language: python

matrix:
include:
- python: 3.5
- python: 3.6
- python: 3.7
dist: xenial
- python: 3.8
dist: focal
sudo: true

# GitHub branch
Expand All @@ -16,19 +16,19 @@ branches:
# install package and dependencies
install:
- pip install scipy astropy
- pip install coverage nose pytest pytest-cov pytest-pep8
- if [[ $TRAVIS_PYTHON_VERSION == '3.6' ]]; then pip install sphinx sphinx-rtd-theme numpydoc travis-sphinx coveralls; fi
- pip install coverage nose pytest==5.4.3 pytest-cov pytest-pep8
- if [[ $TRAVIS_PYTHON_VERSION == '3.8' ]]; then pip install sphinx sphinx-rtd-theme numpydoc travis-sphinx coveralls; fi

# run unit tests
script:
- python setup.py test
- if [[ $TRAVIS_PYTHON_VERSION == '3.6' ]]; then sphinx-apidoc -feo docs/source lenspack/; fi
- if [[ $TRAVIS_PYTHON_VERSION == '3.6' ]]; then travis-sphinx -v -o docs/build build -n -s docs/source; fi
- if [[ $TRAVIS_PYTHON_VERSION == '3.8' ]]; then sphinx-apidoc -feo docs/source lenspack/; fi
- if [[ $TRAVIS_PYTHON_VERSION == '3.8' ]]; then travis-sphinx -v -o docs/build build -n -s docs/source; fi

# run coverage tests
after_success:
- if [[ $TRAVIS_PYTHON_VERSION == '3.6' ]]; then coveralls; fi
- if [[ $TRAVIS_PYTHON_VERSION == '3.6' ]]; then travis-sphinx -o docs/build deploy; fi
- if [[ $TRAVIS_PYTHON_VERSION == '3.8' ]]; then coveralls; fi
- if [[ $TRAVIS_PYTHON_VERSION == '3.8' ]]; then travis-sphinx -o docs/build deploy; fi

# notification settings
notification:
Expand Down
2 changes: 2 additions & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
include README.md
include LICENSE.txt
22 changes: 12 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,7 @@
> Year: 2019
---

This repository is a collection of python codes useful for the weak-lensing
analysis of galaxy catalogs and shear/convergence maps. The full documentation
can be found [here](https://austinpeel.github.io/lenspack/index.html "lenspack documentation").
This repository is a collection of python codes useful for the weak-lensing analysis of galaxy catalogs and shear/convergence maps. The full documentation can be found [here](https://austinpeel.github.io/lenspack/index.html "lenspack documentation").

## Contents

Expand All @@ -27,6 +25,15 @@ In progress.

## Installation

### PyPi

Install the latest release from PyPi.
```
$ pip install lenspack
```

### Local

Clone this repository to your local machine. You might find it helpful to do this in a virtual environment in order to keep a clean workspace.
```
$ git clone https://github.com/cosmostat/lenspack.git
Expand Down Expand Up @@ -72,10 +79,7 @@ fig.colorbar(mappable)
plt.show()
```

<p align="left">
<img src="https://github.com/austinpeel/lenspack/blob/master/examples/figures/peaks.png" alt="peaks" width="400"/>
</p>

![peaks](./examples/figures/peaks.png)

### Wavelet transform

Expand Down Expand Up @@ -106,6 +110,4 @@ for ax in (ax1, ax2, ax3):
ax.set_axis_off()
```

<p align="left">
<img src="https://github.com/austinpeel/lenspack/blob/master/examples/figures/wavelet_transform.png" alt="wavelet_transform" width="900"/>
</p>
![wavelet transfrom](./examples/figures/wavelet_transform.png)
4 changes: 2 additions & 2 deletions lenspack/info.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@

# Default package properties
__license__ = 'MIT'
__about__ = ('{} \n\n Author: {} \n Email: {} \n Year: {} \n {} \n\n'
__about__ = ('{} Author: {}, Email: {}, Year: {}, {}'
''.format(__name__, __author__, __email__, __year__,
__description__))
__setup_requires__ = ['pytest-runner', ]
__tests_require__ = ['pytest', 'pytest-cov', 'pytest-pep8']
__tests_require__ = ['pytest==5.4.3', 'pytest-cov', 'pytest-pep8']

0 comments on commit 6e882b6

Please sign in to comment.