From 08b72564bbdf85d83b9642b3cd69d5e79b16d389 Mon Sep 17 00:00:00 2001 From: Gabriel Stefanini Vicente Date: Wed, 31 Jul 2024 13:15:36 -0400 Subject: [PATCH] Fixes for pyOpenSci Submission (#94) * Remove GA * Fix CONTRIBUTING.md links * Fix CONTRIBUTING.md links * Move CONTRIBUTING.md * Update Documentation title --- CONTRIBUTING.md | 45 ------------------------------------------- README.md | 20 +++++++++++++------ docs/CONTRIBUTING.md | 46 +++++++++++++++++++++++++++++++++++++++++++- docs/_config.yml | 2 +- docs/_toc.yml | 3 +-- docs/conf.py | 3 +-- 6 files changed, 62 insertions(+), 57 deletions(-) delete mode 100644 CONTRIBUTING.md mode change 120000 => 100644 docs/CONTRIBUTING.md diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md deleted file mode 100644 index 0f667e9..0000000 --- a/CONTRIBUTING.md +++ /dev/null @@ -1,45 +0,0 @@ -# CONTRIBUTING - -Thank you for considering contributing! We appreciate your interest in helping us improve our project. By contributing, you agree to abide by our [Code of Conduct](CODE_OF_CONDUCT.md). - -Please take a moment to review this document for important information on how to contribute effectively. - -## How Can I Contribute? - -There are several ways you can contribute to this project: - -- **Bug Reports:** If you encounter a bug or unexpected behavior, please open an issue on our GitHub issue tracker. Be sure to include as much detail as possible to help us identify and fix the problem. - -- **Feature Requests**: If you have an idea for a new feature or enhancement, please open an issue on our GitHub issue tracker and label it as a "feature request." Describe the feature and its use case in detail. - -- **Pull Requests:** If you'd like to contribute code or documentation changes, we encourage you to submit a pull request (PR). Please follow the guidelines outlined in the [Contributing Code](CONTRIBUTING.md) section below. - -- **Documentation:** If you find any errors or have suggestions for improving our documentation, you can submit changes directly through a pull request. - -- **Community Engagement:** Help answer questions and engage with other users and contributors on our GitHub Discussions (if applicable). - -## Contributing Code - -If you're contributing code, please follow these guidelines: - -1. **Fork the Repository**: Click the "Fork" button on the top-right corner of this repository on GitHub. This will create a copy of the project in your GitHub account. - -2. **Create a Branch:** Create a new branch for your feature or bug fix. Use a clear and descriptive name for your branch, like `feature/my-new-feature` or `bugfix/issue-123`. - -3. **Make Changes:** Make your code changes and ensure they adhere to our coding standards. - -4. **Test:** Ensure that your changes do not break existing functionality and add tests for new features or bug fixes. - -5. **Commit and Push:** Commit your changes with a clear and concise commit message. Reference any related issues or pull requests in your commit message. Push your branch to your forked repository on GitHub. - -6. **Create a Pull Request:** Open a pull request against the main branch of this repository. Provide a clear description of your changes and reference any relevant issues. Your PR will be reviewed by maintainers. - -7. **Review and Iterate:** Expect feedback and be prepared to make additional changes if necessary. We may request changes, and once everything looks good, your PR will be merged. - -## Code of Conduct - -Please note that we have a [Code of Conduct](CODE_OF_CONDUCT.md) in place. We expect all contributors to adhere to it, both in interactions within this project and in interactions with other project members. - -## Licensing - -By contributing to this project, you agree that your contributions will be licensed under the project's [LICENSE](../LICENSE). diff --git a/README.md b/README.md index 91d6cd6..7f19266 100644 --- a/README.md +++ b/README.md @@ -25,17 +25,21 @@ - Calculate zonal statistics like mean and sum. - Plot time series of nighttime lights data. -## Installation +## Documentation + +The [**BlackMarblePy**](https://pypi.org/project/blackmarblepy) library allows you to interact with and manipulate data from NASA's Black Marble, which provides global nighttime lights data. Below is a guide on how to use the key functionalities of the library. + +### Installation **BlackMarblePy** is available on [PyPI](https://pypi.org) as [blackmarblepy](https://pypi.org/project/blackmarblepy) and can installed using `pip`: -### From PyPI +#### From PyPI ```shell pip install blackmarblepy ``` -### From Source +#### From Source 1. Clone or download this repository to your local machine. Then, navigate to the root directory of the repository: @@ -65,7 +69,7 @@ pip install blackmarblepy The `-e` flag stands for "editable," meaning changes to the source code will immediately affect the installed package. -### Building Documentation Locally +#### Building Documentation Locally To build the documentation locally, after (1) and (2) above, please follow these steps: @@ -83,7 +87,7 @@ To build the documentation locally, after (1) and (2) above, please follow these The generated documentation will be available in the `_build/html` directory. Open the `index.html` file in a web browser to view it. -## Usage +### Usage Before downloading and extracting Black Marble data, define the [NASA LAADS archive](https://ladsweb.modaps.eosdis.nasa.gov/archive/allData/5000/VNP46A3/) `bearer` token, and define a region of interest (i.e., `gdf` as a [`geopandas.GeoDataFrame`](https://geopandas.org/en/stable/docs/reference/api/geopandas.GeoDataFrame.html)). @@ -99,7 +103,11 @@ daily = bm_raster( ) ``` -For more detailed information and examples, please refer to the [documentation](https://worldbank.github.io/blackmarblepy/notebooks/blackmarblepy.html). +For more detailed information and examples, please refer to the [examples](https://worldbank.github.io/blackmarblepy/notebooks/blackmarblepy.html). + +### Full API Reference + +For a full reference of all available functions and their parameters, please refer to the [official documentation](api/blackmarble.rst). ## Contributing diff --git a/docs/CONTRIBUTING.md b/docs/CONTRIBUTING.md deleted file mode 120000 index 44fcc63..0000000 --- a/docs/CONTRIBUTING.md +++ /dev/null @@ -1 +0,0 @@ -../CONTRIBUTING.md \ No newline at end of file diff --git a/docs/CONTRIBUTING.md b/docs/CONTRIBUTING.md new file mode 100644 index 0000000..3284ec0 --- /dev/null +++ b/docs/CONTRIBUTING.md @@ -0,0 +1,45 @@ +# CONTRIBUTING + +Thank you for considering contributing! We appreciate your interest in helping us improve our project. By contributing, you agree to abide by our [Code of Conduct](CODE_OF_CONDUCT.md). + +Please take a moment to review this document for important information on how to contribute effectively. + +## How Can I Contribute? + +There are several ways you can contribute to this project: + +- **Bug Reports:** If you encounter a bug or unexpected behavior, please open an issue on our GitHub issue tracker. Be sure to include as much detail as possible to help us identify and fix the problem. + +- **Feature Requests**: If you have an idea for a new feature or enhancement, please open an issue on our GitHub issue tracker and label it as a "feature request." Describe the feature and its use case in detail. + +- **Pull Requests:** If you'd like to contribute code or documentation changes, we encourage you to submit a pull request (PR). Please follow the guidelines outlined in the [Contributing Code](#contributing-code) section below. + +- **Documentation:** If you find any errors or have suggestions for improving our documentation, you can submit changes directly through a pull request. + +- **Community Engagement:** Help answer questions and engage with other users and contributors on our GitHub Discussions (if applicable). + +## Contributing Code + +If you're contributing code, please follow these guidelines: + +1. **Fork the Repository**: Click the "Fork" button on the top-right corner of this repository on GitHub. This will create a copy of the project in your GitHub account. + +2. **Create a Branch:** Create a new branch for your feature or bug fix. Use a clear and descriptive name for your branch, like `feature/my-new-feature` or `bugfix/issue-123`. + +3. **Make Changes:** Make your code changes and ensure they adhere to our coding standards. + +4. **Test:** Ensure that your changes do not break existing functionality and add tests for new features or bug fixes. + +5. **Commit and Push:** Commit your changes with a clear and concise commit message. Reference any related issues or pull requests in your commit message. Push your branch to your forked repository on GitHub. + +6. **Create a Pull Request:** Open a pull request against the main branch of this repository. Provide a clear description of your changes and reference any relevant issues. Your PR will be reviewed by maintainers. + +7. **Review and Iterate:** Expect feedback and be prepared to make additional changes if necessary. We may request changes, and once everything looks good, your PR will be merged. + +## Code of Conduct + +Please note that we have a [Code of Conduct](CODE_OF_CONDUCT.md) in place. We expect all contributors to adhere to it, both in interactions within this project and in interactions with other project members. + +## Licensing + +By contributing to this project, you agree that your contributions will be licensed under the project's [LICENSE](../LICENSE). diff --git a/docs/_config.yml b/docs/_config.yml index 05444a0..52bcffc 100644 --- a/docs/_config.yml +++ b/docs/_config.yml @@ -2,7 +2,7 @@ title: author: Development Data Group logo: images/logo.png -only_build_toc_files: true +only_build_toc_files: false repository: url: https://github.com/worldbank/blackmarblepy diff --git a/docs/_toc.yml b/docs/_toc.yml index de5b062..194a95f 100644 --- a/docs/_toc.yml +++ b/docs/_toc.yml @@ -2,10 +2,9 @@ format: jb-book root: README parts: - - caption: Documentation + - caption: API Reference chapters: - file: api/blackmarble.rst - - file: CONTRIBUTING - caption: Examples chapters: - file: notebooks/blackmarblepy.ipynb diff --git a/docs/conf.py b/docs/conf.py index 33d9e9d..725a26c 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -25,7 +25,7 @@ "sphinx.ext.napoleon", "sphinxcontrib.apidoc", ] -external_toc_exclude_missing = True +external_toc_exclude_missing = False external_toc_path = "_toc.yml" extra_extensions = ["sphinxcontrib.apidoc"] html_baseurl = "https://worldbank.github.io/blackmarblepy" @@ -50,7 +50,6 @@ "extra_footer": "", "home_page_in_toc": False, "announcement": "", - "analytics": {"google_analytics_id": "G-ZWF69GP65G"}, "use_repository_button": True, "use_edit_page_button": True, "use_issues_button": True,