Skip to content

Commit 4e7dee0

Browse files
Merge pull request #20 from SnappyLab/doc/16-doc-how-to-add-a-new-provider
Doc/16 doc how to add a new provider
2 parents d935476 + ee7ef34 commit 4e7dee0

25 files changed

+1050
-29
lines changed

.github/workflows/deploy-docs.yml

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
name: Deploy MkDocs to GitHub Pages
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
paths:
8+
- "docs/**"
9+
- "mkdocs.yml"
10+
workflow_dispatch:
11+
12+
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
13+
permissions:
14+
contents: read
15+
pages: write
16+
id-token: write
17+
18+
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
19+
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
20+
concurrency:
21+
group: "pages"
22+
cancel-in-progress: false
23+
24+
jobs:
25+
deploy:
26+
runs-on: ubuntu-latest
27+
steps:
28+
- name: Checkout repository
29+
uses: actions/checkout@v4
30+
31+
- name: Set up Python
32+
uses: actions/setup-python@v5
33+
with:
34+
python-version: "3.13"
35+
36+
- name: Install mkdocs and material theme
37+
run: |
38+
pip install mkdocs mkdocs-material
39+
40+
- name: Build documentation
41+
run: |
42+
mkdocs build --strict
43+
44+
- name: Setup Pages
45+
uses: actions/configure-pages@v5
46+
47+
- name: Upload artifact
48+
uses: actions/upload-pages-artifact@v3
49+
with:
50+
path: "./site"
51+
52+
- name: Deploy to GitHub Pages
53+
id: deployment
54+
uses: actions/deploy-pages@v4

.github/workflows/docbinder-oss.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,11 @@ jobs:
4040
run: |
4141
uv sync --locked --all-extras --dev
4242
43+
- name: Lint code with uv
44+
run: |
45+
uv tool run ruff check --fix
46+
uv tool run ruff format
47+
4348
- name: Run tox with uv
4449
run: |
4550
uv run tox -e ${{ matrix.tox-env }}

CONTRIBUTING.md

Lines changed: 12 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@
22

33
Thank you for your interest in contributing! Please follow these guidelines:
44

5-
- Fork the repository and create your branch from `main`.
5+
- Fork the repository and create your branch from `dev`.
66
- Write clear, concise commit messages.
77
- Add tests for new features or bug fixes.
88
- Ensure all tests pass before submitting a pull request.
99
- Follow the code style used in the project.
1010
- For major changes, open an issue first to discuss what you would like to change.
1111

1212
## Pull Request Process
13-
1. Ensure your branch is up to date with `main`.
13+
1. Ensure your branch is up to date with `dev`.
1414
2. Submit your pull request and fill out the PR template.
1515
3. One or more maintainers will review your code.
1616
4. Address any feedback and update your PR as needed.
@@ -20,7 +20,7 @@ Thank you for helping make DocBinder OSS better!
2020
# Local Development
2121
## Managing Dependencies and Environment with `uv`
2222

23-
This project uses [`uv`](https://github.com/astral-sh/uv) for dependency management and environment setup.
23+
This project uses [`uv`](https://github.com/astral-sh/uv) for dependency management and environment setup. We do **not** use `requirements.txt`, all dependency management is handled natively by `uv`.
2424

2525
### Setting Up the Environment
2626

@@ -29,34 +29,31 @@ To create a virtual environment and install dependencies:
2929
```zsh
3030
uv venv
3131
source .venv/bin/activate
32-
uv pip install -r requirements.txt
32+
uv sync
3333
```
3434

3535
### Adding or Updating a Dependency
3636

37-
To add or update a package (e.g., `docbinder-oss`) and update `requirements.txt`:
37+
To add or update a package (e.g., `docbinder-oss`):
3838

3939
```zsh
40-
uv pip install docbinder-oss --upgrade --system --sync
40+
uv add docbinder-oss
4141
```
4242

43-
### Exporting Current Environment
43+
### Upgrading All Dependencies
4444

45-
To export your current environment to `requirements.txt`:
45+
To upgrade all dependencies to their latest compatible versions:
4646

4747
```zsh
48-
uv pip freeze > requirements.txt
48+
uv version docbinder-oss --bump minor
49+
uv sync
4950
```
5051

5152
### Generating or Updating `pyproject.toml`
5253

53-
To generate or update `pyproject.toml` with your current dependencies:
54-
55-
```zsh
56-
uv pip compile --generate pyproject.toml
57-
```
54+
All dependencies are tracked in `pyproject.toml`. Use `uv` commands to keep it up to date.
5855

5956
---
6057

6158
**Note:**
62-
Always use `uv` commands to manage dependencies and environments to keep `requirements.txt` and `pyproject.toml` in sync.
59+
Always use `uv` commands to manage dependencies and environments to keep `pyproject.toml` in sync.

docs/CODE_OF_CONDUCT.md

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# Contributor Covenant Code of Conduct
2+
3+
## Our Pledge
4+
5+
We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone, regardless of age, body size, visible or invisible disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, religion, or sexual identity and orientation.
6+
7+
We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive, and healthy community.
8+
9+
## Our Standards
10+
11+
Examples of behavior that contributes to a positive environment for our community include:
12+
13+
- Demonstrating empathy and kindness toward other people
14+
- Being respectful of differing opinions, viewpoints, and experiences
15+
- Giving and gracefully accepting constructive feedback
16+
- Accepting responsibility and apologizing to those affected by our mistakes, and learning from the experience
17+
- Focusing on what is best not just for us as individuals, but for the overall community
18+
19+
Examples of unacceptable behavior include:
20+
21+
- The use of sexualized language or imagery, and sexual attention or advances of any kind
22+
- Trolling, insulting or derogatory comments, and personal or political attacks
23+
- Public or private harassment
24+
- Publishing others’ private information, such as a physical or email address, without their explicit permission
25+
- Other conduct which could reasonably be considered inappropriate in a professional setting
26+
27+
## Enforcement Responsibilities
28+
29+
Community leaders are responsible for clarifying and enforcing our standards of acceptable behavior and will take appropriate and fair corrective action in response to any behavior that they deem inappropriate, threatening, offensive, or harmful.
30+
31+
## Scope
32+
33+
This Code of Conduct applies within all community spaces, and also applies when an individual is officially representing the community in public spaces.
34+
35+
## Enforcement
36+
37+
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the community leaders responsible for enforcement at [christophe@snappylab.dev](mailto:christophe@snappylab.dev).
38+
39+
All complaints will be reviewed and investigated promptly and fairly.

docs/CONTRIBUTING.md

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
# Contributing to DocBinder OSS
2+
3+
Thank you for your interest in contributing! Please follow these guidelines:
4+
5+
- Fork the repository and create your branch from `dev`.
6+
- Write clear, concise commit messages.
7+
- Add tests for new features or bug fixes.
8+
- Ensure all tests pass before submitting a pull request.
9+
- Follow the code style used in the project.
10+
- For major changes, open an issue first to discuss what you would like to change.
11+
12+
## Pull Request Process
13+
1. Ensure your branch is up to date with `dev`.
14+
2. Submit your pull request and fill out the PR template.
15+
3. One or more maintainers will review your code.
16+
4. Address any feedback and update your PR as needed.
17+
18+
Thank you for helping make DocBinder OSS better!
19+
20+
# Local Development
21+
## Managing Dependencies and Environment with `uv`
22+
23+
This project uses [`uv`](https://github.com/astral-sh/uv) for dependency management and environment setup. We do **not** use `requirements.txt`, all dependency management is handled natively by `uv`.
24+
25+
### Setting Up the Environment
26+
27+
To create a virtual environment and install dependencies:
28+
29+
```zsh
30+
uv venv
31+
source .venv/bin/activate
32+
uv sync
33+
```
34+
35+
### Adding or Updating a Dependency
36+
37+
To add or update a package (e.g., `docbinder-oss`):
38+
39+
```zsh
40+
uv add docbinder-oss
41+
```
42+
43+
### Upgrading All Dependencies
44+
45+
To upgrade all dependencies to their latest compatible versions:
46+
47+
```zsh
48+
uv version docbinder-oss --bump minor
49+
uv sync
50+
```
51+
52+
### Generating or Updating `pyproject.toml`
53+
54+
All dependencies are tracked in `pyproject.toml`. Use `uv` commands to keep it up to date.
55+
56+
---
57+
58+
**Note:**
59+
Always use `uv` commands to manage dependencies and environments to keep `pyproject.toml` in sync.

0 commit comments

Comments
 (0)