Skip to content

Commit

Permalink
Updates README
Browse files Browse the repository at this point in the history
  • Loading branch information
giswqs committed May 9, 2020
1 parent 2aa9b74 commit b92b973
Show file tree
Hide file tree
Showing 5 changed files with 142 additions and 10 deletions.
2 changes: 1 addition & 1 deletion CONTRIBUTING.rst
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ Before you submit a pull request, check that it meets these guidelines:
2. If the pull request adds functionality, the docs should be updated. Put
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
3. The pull request should work for Python 3.6, 3.7 and 3.8, and for PyPy. Check
https://travis-ci.com/giswqs/geemap/pull_requests
and make sure that the tests pass for all supported Python versions.

Expand Down
4 changes: 4 additions & 0 deletions HISTORY.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
=======
History
=======
0.6.0 (2020-04-05)
------------------
0.5.0 (2020-03-24)
------------------
0.4.0 (2020-03-19)
------------------
0.3.0 (2020-03-18)
Expand Down
119 changes: 116 additions & 3 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ A Python package for interactive mapping with Google Earth Engine, ipyleaflet, a
- `Usage`_
- `Examples`_
- `Dependencies`_
- `Reporting Bugs`_
- `Contributing`_
- `Credits`_


Expand Down Expand Up @@ -506,8 +506,16 @@ Dependencies
.. _bqplot: https://github.com/bloomberg/bqplot
.. _ipynb-py-convert: https://github.com/kiwi0fruit/ipynb-py-convert

Reporting Bugs
--------------
Contributing
------------
Contributions are welcome, and they are greatly appreciated! Every little bit
helps, and credit will always be given.

You can contribute in many ways:

Report Bugs
~~~~~~~~~~~

Report bugs at https://github.com/giswqs/geemap/issues.

If you are reporting a bug, please include:
Expand All @@ -516,6 +524,111 @@ If you are reporting a bug, please include:
* Any details about your local setup that might be helpful in troubleshooting.
* Detailed steps to reproduce the bug.

Fix Bugs
~~~~~~~~

Look through the GitHub issues for bugs. Anything tagged with "bug" and "help
wanted" is open to whoever wants to implement it.

Implement Features
~~~~~~~~~~~~~~~~~~

Look through the GitHub issues for features. Anything tagged with "enhancement"
and "help wanted" is open to whoever wants to implement it.

Write Documentation
~~~~~~~~~~~~~~~~~~~

geemap could always use more documentation, whether as part of the
official geemap 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/giswqs/geemap/issues.

If you are proposing a feature:

* Explain in detail how it would work.
* Keep the scope as narrow as possible, to make it easier to implement.
* Remember that this is a volunteer-driven project, and that contributions
are welcome :)

Get Started!
~~~~~~~~~~~~

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

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

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

4. Create a branch for local development::

$ git checkout -b name-of-your-bugfix-or-feature

Now you can make your changes locally.

5. When you're done making changes, check that your changes pass flake8 and the
tests, including testing other Python versions with tox::

$ flake8 geemap tests
$ python setup.py test or pytest
$ tox

To get flake8 and tox, just pip install them into your virtualenv.

6. Commit your changes and push your branch to GitHub::

$ git add .
$ git commit -m "Your detailed description of your changes."
$ git push origin name-of-your-bugfix-or-feature

7. Submit a pull request through the GitHub website.

Pull Request Guidelines
~~~~~~~~~~~~~~~~~~~~~~~

Before you submit a pull request, check that it meets these guidelines:

1. The pull request should include tests.
2. If the pull request adds functionality, the docs should be updated. Put
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.6, 3.7 and 3.8, and for PyPy. Check
https://travis-ci.com/giswqs/geemap/pull_requests
and make sure that the tests pass for all supported Python versions.

Tips
~~~~

To run a subset of tests::


$ python -m unittest tests.test_geemap

Deploying
~~~~~~~~~

A reminder for the maintainers on how to deploy.
Make sure all your changes are committed (including an entry in HISTORY.rst).
Then run::

$ bump2version patch # possible: major / minor / patch
$ git push
$ git push --tags

Travis will then deploy to PyPI if tests pass.

Credits
-------

Expand Down
22 changes: 16 additions & 6 deletions geemap/basemaps.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,18 @@
from ipyleaflet import TileLayer, WMSLayer, basemaps, basemap_to_tiles
"""Module for basemaps. Each basemap is defined as item in the ee_basemaps dictionary. For example, to access Google basemaps, use the following:
ee_basemaps['ROADMAP], ee_basemaps['SATELLITE'], ee_basemaps['HYBRID'].
More WMS basemaps can be found at the following websites:
1. USGS National Map: https://viewer.nationalmap.gov/services/
2. MRLC NLCD Land Cover data: https://viewer.nationalmap.gov/services/
# More WMS basemaps can be found at the following websites:
# USGS National Map: https://viewer.nationalmap.gov/services/
# MRLC NLCD Land Cover data: https://viewer.nationalmap.gov/services/
# FWS NWI Wetlands data: https://www.fws.gov/wetlands/Data/Web-Map-Services.html
3. FWS NWI Wetlands data: https://www.fws.gov/wetlands/Data/Web-Map-Services.html
"""

from ipyleaflet import TileLayer, WMSLayer, basemaps, basemap_to_tiles


ee_basemaps = {
Expand Down Expand Up @@ -236,4 +245,5 @@
name = item[sub_item]['name']
basemap = 'basemaps.{}'.format(name)
basemap = basemap.replace('Mids', 'Modis')
ee_basemaps[name] = basemap_to_tiles(eval(basemap))
ee_basemaps[name] = basemap_to_tiles(eval(basemap))

5 changes: 5 additions & 0 deletions geemap/conversion.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
''' Module for converting Google Earth Engine (GEE) JavaScripts to Python scripts and Jupyter notebooks.
To convert a GEE JavaScript to Python script: js_to_python(in_file out_file)
To convert all GEE JavaScripts in a folder recursively to Python scripts: js_to_python_dir(in_dir, out_dir)
To convert a GEE Python script to Jupyter notebook: py_to_ipynb(in_file, template_file, out_file)
To convert all GEE Python scripts in a folder recursively to Jupyter notebooks: py_to_ipynb_dir(in_dir, template_file, out_dir)
To execute a Jupyter notebook and save output cells: execute_notebook(in_file)
To execute all Jupyter notebooks in a folder recursively: execute_notebook_dir(in_dir)
'''
Expand Down

0 comments on commit b92b973

Please sign in to comment.