Skip to content

Commit f6d55ce

Browse files
committed
chore: updated contributing guide
1 parent fdee5e2 commit f6d55ce

File tree

2 files changed

+82
-66
lines changed

2 files changed

+82
-66
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,3 +111,4 @@ deployment/k8s/titiler/values-test.yaml
111111

112112

113113
libcairo.2.dylib
114+
.DS_Store

CONTRIBUTING.md

Lines changed: 81 additions & 66 deletions
Original file line numberDiff line numberDiff line change
@@ -1,84 +1,99 @@
1-
# Contributing to nigeria_geodata
1+
# Contributing
22

3-
We’re excited that you want to contribute to nigeria_geodata! By participating, youre helping to improve this project for everyone.
3+
Thank you for your interest in contributing to _nigeria_geodata_. If you're a developer, you can skip to the [development](#development) section.
44

5-
> And if you like the project, but just don't have time to contribute, that's fine. There are other easy ways to support the project and show your appreciation, which we would also be very happy about:
6-
> - Star the project
7-
> - Tweet about it
8-
> - Refer this project in your project's readme
9-
> - Mention the project at local meetups and tell your friends/colleagues
5+
## General
106

11-
To ensure a smooth process, please follow the guidelines outlined below.
7+
If you're not a developer or you don't have the time to contribute, here are other easy ways to support the project:
128

9+
- Star the project.
10+
- Tweet about it or promote it on social media.
11+
- Use it in your project.
12+
- Mention the project at your organization, conference, articles, or tell your friends/colleagues about it.
1313

14-
## Table of Contents
15-
1. [How to Contribute](#how-to-contribute)
16-
- [Reporting Issues](#reporting-issues)
17-
- [Contributing Code](#contributing-code)
18-
- [Code of Conduct](#code-of-conduct)
19-
- [Development Setup](#development-setup)
20-
- [Documentation](#documentation)
21-
2. [Helpful Links](#helpful-links)
22-
3. [Questions?](#questions)
14+
## Development
2315

16+
### Clone the project
2417

25-
## How to Contribute
18+
```bash
19+
# clone the repo
20+
git clone https://github.com/jeafreezy/nigeria_geodata.git
2621

27-
### Reporting Issues
22+
# enter the project directory
23+
cd nigeria_geodata
24+
```
2825

29-
1. **Search Existing Issues**: Before opening a new issue, please check our [existing issues](https://github.com/jeafreezy/nigeria_geodata/issues) to see if your problem has already been reported or addressed.
30-
2. **Open a New Issue**: If you don’t find a matching issue, you can open a new one. Provide a clear and descriptive title, and include:
31-
- A summary of the issue
32-
- Steps to reproduce the problem
33-
- Any relevant error messages or screenshots
34-
- Your environment details (e.g., operating system, browser version)
26+
### Python
3527

36-
### Contributing Code
28+
This project is developed with **Python 3.8.1** and uses [Poetry](https://python-poetry.org/) to manage Python dependencies.
29+
30+
After cloning the project and installing Poetry, run:
31+
32+
```bash
33+
poetry install
34+
```
35+
36+
to install all dependencies.
37+
38+
### Pre-commit
39+
40+
This repo is set to use pre-commit to run the following hooks: check-yaml, end-of-file-fixer, trailing-whitespace, [Ruff](https://docs.astral.sh/ruff/) ("An extremely fast Python linter and code formatter, written in Rust.") when committing new code.
41+
42+
Run:
43+
44+
```bash
45+
pre-commit install
46+
```
47+
to install the pre-commit hooks.
48+
49+
In case you run into errors, it is likely that you haven't installed the dev dependencies. In this case, you can run the command below to install them, then you can retry the command above again.
50+
51+
```bash
52+
poetry install --with dev
53+
```
54+
55+
### Tests
56+
57+
This project uses [Pytest](https://docs.pytest.org/en/stable/) for testing. Run the command below to run the tests:
58+
59+
```python
60+
pytest
61+
```
3762

38-
1. **Fork the Repository**: Click the "Fork" button at the top right of this page to create a copy of the repository in your own GitHub account.
39-
2. **Clone Your Fork**: Clone the forked repository to your local machine:
40-
```bash
41-
git clone https://github.com/jeafreezy/nigeria_geodata.git
42-
```
43-
3. **Create a New Branch**: Create a new branch for your changes:
44-
```bash
45-
git checkout -b feature/your-feature
46-
```
47-
4. **Make Your Changes**: Implement your changes on the new branch. Follow our coding style and guidelines.
48-
5. **Write Tests**: If applicable, write tests to ensure that your changes work as expected and do not break existing functionality.
49-
6. **Commit Your Changes**: Commit your changes with a descriptive message:
50-
```bash
51-
git add .
52-
git commit -m "Describe your changes here"
53-
```
54-
7. **Push Your Changes**: Push your changes to your forked repository:
55-
```bash
56-
git push origin feature/your-feature
57-
```
58-
8. **Open a Pull Request**: Go to the original repository and open a pull request from your branch. Provide a clear description of your changes and link to any related issues.
59-
60-
### Code of Conduct
61-
We expect all contributors to follow our [Code of Conduct](https://github.com/jeafreezy/nigeria_geodata/blob/main/CODE_OF_CONDUCT.md). Our goal is to provide a welcoming and inclusive environment for everyone.
62-
63-
### Development Setup
64-
65-
1. **Install Dependencies**: Follow the instructions in the [README.md](https://github.com/jeafreezy/nigeria_geodata/blob/main/README.md) file to set up your development environment.
66-
2. **Run Tests**: Ensure all tests pass before submitting a pull request:
67-
```bash
68-
python tests
69-
```
63+
64+
In case you run into errors, it is likely that you haven't installed the dev dependencies. In this case, you can run the command below to install them, then you can retry the command above again.
65+
66+
```bash
67+
poetry install --with dev
68+
```
7069

7170
### Documentation
72-
Update the documentation if your changes affect how the project is used or configured. Documentation changes should be made in the same pull request as code changes.
7371

74-
### Helpful Links
72+
The documentation website is generated with [mkdocs-material](https://squidfunk.github.io/mkdocs-material/). After poetry install, you can serve the docs website locally with:
73+
74+
```bash
75+
poetry run mkdocs serve
76+
```
77+
78+
In case you run into errors, it is likely that you haven't installed the docs dependencies. In this case, you can run the command below to install them, then you can retry the command above again.
79+
80+
```bash
81+
poetry install --with docs
82+
```
83+
84+
### CI-CD & Publishing
85+
86+
This project uses GitHub Actions for automated tests and deployment. The `.github/workflows` folder comprise of three major workflows:
87+
1. `deploy-mkdocs.yml` : It handles the automated deployment of the documentation site. It is triggered on every push to the main branch.
88+
2. `release.yml`: It handles the release of the package to [PyPI](https://pypi.org/). It happens when a tag with `v*` is set and pushed to the main branch.
89+
3. `tests.yml`: It runs on every pull requests and push to the main branch. It runs the test suites across major Python versions (3.8, 3.9, 3.10, 3.11).
90+
91+
92+
## Helpful Links
93+
94+
Issues and pull requests are more than welcome:
95+
7596
- [Project Documentation](https://jeafreezy.github.io/nigeria_geodata/)
7697
- [Issue Tracker](https://github.com/jeafreezy/nigeria_geodata/issues)
7798
- [Pull Requests](https://github.com/jeafreezy/nigeria_geodata/pulls)
7899
- [Code of Conduct](https://github.com/jeafreezy/nigeria_geodata/blob/main/CODE_OF_CONDUCT.md)
79-
80-
## Questions?
81-
82-
If you have any questions or need assistance, please open an issue or contact us at [email protected].
83-
84-
Thank you for helping to improve nigeria_geodata!

0 commit comments

Comments
 (0)