Skip to content

Commit

Permalink
Add Building Documentation Locally (#53)
Browse files Browse the repository at this point in the history
* Move CONTRIBUTING.md

* Link CONTRIBUTING.md

* Update instructions
  • Loading branch information
g4brielvs authored Feb 1, 2024
1 parent 06f66f5 commit 4fc7be1
Show file tree
Hide file tree
Showing 4 changed files with 107 additions and 52 deletions.
45 changes: 45 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -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](docs/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](docs/CODE_OF_CONDUCT) 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).
58 changes: 56 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,60 @@

**BlackMarblePy** is available on [PyPI](https://pypi.org) as [blackmarblepy](https://pypi.org/project/blackmarblepy) and can installed using `pip`:

### From PyPI

```shell
pip install blackmarblepy
```

### From Source

1. Clone or download this repository to your local machine. Then, navigate to the root directory of the repository:

```shell
git clone https://github.com/worldbank/blackmarblepy.git
cd blackmarblepy
```

2. Create a virtual environment (optional but recommended):

```shell
python3 -m venv venv
source venv/bin/activate # On Windows, use `venv\Scripts\activate`
```

3. Install the package with dependencies:

```shell
pip install .
```

Install the package **in editable** mode with dependencies:

```shell
pip install -e .
```

The `-e` flag stands for "editable," meaning changes to the source code will immediately affect the installed package.

### Bulding Documentation Locally

To build the documentation locally, after (1) and (2) above, please follow these steps:

- Install the package with documentation dependencies:

```shell
pip install -e .[docs]
```

- Build the documentation:m

```shell
sphinx-build docs _build/html -b html
```

The generated documentation will be available in the `_build/html` directory. Open the `index.html` file in a web browser to view it.

## 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)).
Expand All @@ -54,7 +104,11 @@ For more detailed information and examples, please refer to the [documentation](

## Contributing

Contributions are welcome! If you'd like to contribute, please follow our [contribution guidelines](CONTRIBUTING.md).
We welcome contributions to improve this documentation. If you find errors, have suggestions, or want to add new content, please follow our [contribution guidelines](CONTRIBUTING.md).

### Feedback and Issues

If you have any feedback, encounter issues, or want to suggest improvements, please [open an issue](https://github.com/worldbank/blackmarblepy/issues).

### Contributors

Expand Down Expand Up @@ -91,4 +145,4 @@ When using **BlackMarblePy**, your support is much appreciated! Please consider

## License

This project is open-source - see the [LICENSE](LICENSE) file for details
This projects is licensed under the [**Mozilal Public License**](https://opensource.org/license/mpl-2-0/) - see the [LICENSE](LICENSE) file for details.
45 changes: 0 additions & 45 deletions docs/CONTRIBUTING.md

This file was deleted.

1 change: 1 addition & 0 deletions docs/CONTRIBUTING.md
10 changes: 5 additions & 5 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[build-system]
requires = ["setuptools>=61.0.0"]
requires = ["setuptools>=64.0.0"]
build-backend = "setuptools.build_meta"

[project]
Expand Down Expand Up @@ -45,12 +45,12 @@ dependencies = [
]
[project.optional-dependencies]
docs = [
"docutils==0.17.1", # https://jupyterbook.org/en/stable/content/citations.html?highlight=docutils#citations-and-bibliographies
"jupyter-book >= 0.15.1",
"sphinxcontrib-apidoc >= 0.4.0, <1",
"docutils==0.17.1", # https://jupyterbook.org/en/stable/content/citations.html?highlight=docutils#citations-and-bibliographies
"jupyter-book>=0.15.1",
"sphinxcontrib-apidoc>=0.4.0,<1",
"docutils==0.17.1",
]

tests = ["pytest"]

[project.urls]
"Homepage" = "https://github.com/worldbank/blackmarblepy"
Expand Down

0 comments on commit 4fc7be1

Please sign in to comment.