Skip to content

Commit 6d1b89f

Browse files
committed
added the basics for nbdev
1 parent 1b78c9b commit 6d1b89f

File tree

17 files changed

+562
-1
lines changed

17 files changed

+562
-1
lines changed

.github/workflows/deploy.yaml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
name: Deploy to GitHub Pages
2+
3+
permissions:
4+
contents: write
5+
pages: write
6+
7+
on:
8+
push:
9+
branches: [ "main", "master" ]
10+
workflow_dispatch:
11+
jobs:
12+
deploy:
13+
runs-on: ubuntu-latest
14+
steps: [uses: fastai/workflows/quarto-ghp@master]

.github/workflows/test.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
name: CI
2+
on: [workflow_dispatch, pull_request, push]
3+
4+
jobs:
5+
test:
6+
runs-on: ubuntu-latest
7+
steps: [uses: fastai/workflows/nbdev-ci@master]

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,3 +169,6 @@ cython_debug/
169169

170170
# PyPI configuration file
171171
.pypirc
172+
.python-version
173+
uv.lock
174+
_proc

CONTRIBUTING.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
things to say about
2+
- how pyproject.toml and setttings.ini work together
3+
- iterative programming and nbdev tutorial

MANIFEST.in

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
include settings.ini
2+
include LICENSE
3+
include CONTRIBUTING.md
4+
include README.md
5+
recursive-exclude * __pycache__

README.md

Lines changed: 66 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,67 @@
11
# ragas_annotator
2-
Experimental Ragas Evaluation Library
2+
3+
4+
<!-- WARNING: THIS FILE WAS AUTOGENERATED! DO NOT EDIT! -->
5+
6+
This file will become your README and also the index of your
7+
documentation.
8+
9+
## Developer Guide
10+
11+
If you are new to using `nbdev` here are some useful pointers to get you
12+
started.
13+
14+
### Install ragas_annotator in Development mode
15+
16+
``` sh
17+
# make sure ragas_annotator package is installed in development mode
18+
$ pip install -e .
19+
20+
# make changes under nbs/ directory
21+
# ...
22+
23+
# compile to have changes apply to ragas_annotator
24+
$ nbdev_prepare
25+
```
26+
27+
## Usage
28+
29+
### Installation
30+
31+
Install latest from the GitHub
32+
[repository](https://github.com/explodinggradients/ragas_annotator):
33+
34+
``` sh
35+
$ pip install git+https://github.com/explodinggradients/ragas_annotator.git
36+
```
37+
38+
or from [conda](https://anaconda.org/explodinggradients/ragas_annotator)
39+
40+
``` sh
41+
$ conda install -c explodinggradients ragas_annotator
42+
```
43+
44+
or from [pypi](https://pypi.org/project/ragas_annotator/)
45+
46+
``` sh
47+
$ pip install ragas_annotator
48+
```
49+
50+
### Documentation
51+
52+
Documentation can be found hosted on this GitHub
53+
[repository](https://github.com/explodinggradients/ragas_annotator)’s
54+
[pages](https://explodinggradients.github.io/ragas_annotator/).
55+
Additionally you can find package manager specific guidelines on
56+
[conda](https://anaconda.org/explodinggradients/ragas_annotator) and
57+
[pypi](https://pypi.org/project/ragas_annotator/) respectively.
58+
59+
## How to use
60+
61+
Fill me in please! Don’t forget code examples:
62+
63+
``` python
64+
1+1
65+
```
66+
67+
2

nbs/00_core.ipynb

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
{
2+
"cells": [
3+
{
4+
"cell_type": "markdown",
5+
"metadata": {},
6+
"source": [
7+
"# core\n",
8+
"\n",
9+
"> Fill in a module description here"
10+
]
11+
},
12+
{
13+
"cell_type": "code",
14+
"execution_count": null,
15+
"metadata": {},
16+
"outputs": [],
17+
"source": [
18+
"#| default_exp core"
19+
]
20+
},
21+
{
22+
"cell_type": "code",
23+
"execution_count": null,
24+
"metadata": {},
25+
"outputs": [],
26+
"source": [
27+
"#| hide\n",
28+
"from nbdev.showdoc import *"
29+
]
30+
},
31+
{
32+
"cell_type": "code",
33+
"execution_count": null,
34+
"metadata": {},
35+
"outputs": [],
36+
"source": [
37+
"#| export\n",
38+
"def foo(): pass"
39+
]
40+
},
41+
{
42+
"cell_type": "code",
43+
"execution_count": null,
44+
"metadata": {},
45+
"outputs": [],
46+
"source": [
47+
"#| hide\n",
48+
"import nbdev; nbdev.nbdev_export()"
49+
]
50+
}
51+
],
52+
"metadata": {
53+
"kernelspec": {
54+
"display_name": "python3",
55+
"language": "python",
56+
"name": "python3"
57+
}
58+
},
59+
"nbformat": 4,
60+
"nbformat_minor": 4
61+
}

nbs/_quarto.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
project:
2+
type: website
3+
4+
format:
5+
html:
6+
theme: cosmo
7+
css: styles.css
8+
toc: true
9+
keep-md: true
10+
commonmark: default
11+
12+
website:
13+
twitter-card: true
14+
open-graph: true
15+
repo-actions: [issue]
16+
navbar:
17+
background: primary
18+
search: true
19+
sidebar:
20+
style: floating
21+
22+
metadata-files: [nbdev.yml, sidebar.yml]

nbs/index.ipynb

Lines changed: 192 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,192 @@
1+
{
2+
"cells": [
3+
{
4+
"cell_type": "code",
5+
"execution_count": null,
6+
"metadata": {},
7+
"outputs": [],
8+
"source": [
9+
"#| hide\n",
10+
"from ragas_annotator.core import *"
11+
]
12+
},
13+
{
14+
"cell_type": "markdown",
15+
"metadata": {},
16+
"source": [
17+
"# ragas_annotator\n",
18+
"\n",
19+
"> Experimental Ragas Evaluation UI and Library"
20+
]
21+
},
22+
{
23+
"cell_type": "markdown",
24+
"metadata": {},
25+
"source": [
26+
"This file will become your README and also the index of your documentation."
27+
]
28+
},
29+
{
30+
"cell_type": "markdown",
31+
"metadata": {},
32+
"source": [
33+
"## Developer Guide"
34+
]
35+
},
36+
{
37+
"cell_type": "markdown",
38+
"metadata": {},
39+
"source": [
40+
"If you are new to using `nbdev` here are some useful pointers to get you started."
41+
]
42+
},
43+
{
44+
"cell_type": "markdown",
45+
"metadata": {},
46+
"source": [
47+
"### Install ragas_annotator in Development mode"
48+
]
49+
},
50+
{
51+
"cell_type": "markdown",
52+
"metadata": {},
53+
"source": [
54+
"```sh\n",
55+
"# make sure ragas_annotator package is installed in development mode\n",
56+
"$ pip install -e .\n",
57+
"\n",
58+
"# make changes under nbs/ directory\n",
59+
"# ...\n",
60+
"\n",
61+
"# compile to have changes apply to ragas_annotator\n",
62+
"$ nbdev_prepare\n",
63+
"```"
64+
]
65+
},
66+
{
67+
"cell_type": "markdown",
68+
"metadata": {},
69+
"source": [
70+
"## Usage"
71+
]
72+
},
73+
{
74+
"cell_type": "markdown",
75+
"metadata": {},
76+
"source": [
77+
"### Installation"
78+
]
79+
},
80+
{
81+
"cell_type": "markdown",
82+
"metadata": {},
83+
"source": [
84+
"Install latest from the GitHub [repository][repo]:\n",
85+
"\n",
86+
"```sh\n",
87+
"$ pip install git+https://github.com/explodinggradients/ragas_annotator.git\n",
88+
"```\n",
89+
"\n",
90+
"or from [conda][conda]\n",
91+
"\n",
92+
"```sh\n",
93+
"$ conda install -c explodinggradients ragas_annotator\n",
94+
"```\n",
95+
"\n",
96+
"or from [pypi][pypi]\n",
97+
"\n",
98+
"\n",
99+
"```sh\n",
100+
"$ pip install ragas_annotator\n",
101+
"```\n",
102+
"\n",
103+
"\n",
104+
"[repo]: https://github.com/explodinggradients/ragas_annotator\n",
105+
"[docs]: https://explodinggradients.github.io/ragas_annotator/\n",
106+
"[pypi]: https://pypi.org/project/ragas_annotator/\n",
107+
"[conda]: https://anaconda.org/explodinggradients/ragas_annotator"
108+
]
109+
},
110+
{
111+
"cell_type": "markdown",
112+
"metadata": {},
113+
"source": [
114+
"### Documentation"
115+
]
116+
},
117+
{
118+
"cell_type": "markdown",
119+
"metadata": {},
120+
"source": [
121+
"Documentation can be found hosted on this GitHub [repository][repo]'s [pages][docs]. Additionally you can find package manager specific guidelines on [conda][conda] and [pypi][pypi] respectively.\n",
122+
"\n",
123+
"[repo]: https://github.com/explodinggradients/ragas_annotator\n",
124+
"[docs]: https://explodinggradients.github.io/ragas_annotator/\n",
125+
"[pypi]: https://pypi.org/project/ragas_annotator/\n",
126+
"[conda]: https://anaconda.org/explodinggradients/ragas_annotator"
127+
]
128+
},
129+
{
130+
"cell_type": "markdown",
131+
"metadata": {},
132+
"source": [
133+
"## How to use"
134+
]
135+
},
136+
{
137+
"cell_type": "markdown",
138+
"metadata": {},
139+
"source": [
140+
"Fill me in please! Don't forget code examples:"
141+
]
142+
},
143+
{
144+
"cell_type": "code",
145+
"execution_count": null,
146+
"metadata": {},
147+
"outputs": [
148+
{
149+
"data": {
150+
"text/plain": [
151+
"2"
152+
]
153+
},
154+
"execution_count": null,
155+
"metadata": {},
156+
"output_type": "execute_result"
157+
}
158+
],
159+
"source": [
160+
"1+1"
161+
]
162+
},
163+
{
164+
"cell_type": "code",
165+
"execution_count": null,
166+
"metadata": {},
167+
"outputs": [],
168+
"source": []
169+
}
170+
],
171+
"metadata": {
172+
"kernelspec": {
173+
"display_name": "Python 3 (ipykernel)",
174+
"language": "python",
175+
"name": "python3"
176+
},
177+
"language_info": {
178+
"codemirror_mode": {
179+
"name": "ipython",
180+
"version": 3
181+
},
182+
"file_extension": ".py",
183+
"mimetype": "text/x-python",
184+
"name": "python",
185+
"nbconvert_exporter": "python",
186+
"pygments_lexer": "ipython3",
187+
"version": "3.11.8"
188+
}
189+
},
190+
"nbformat": 4,
191+
"nbformat_minor": 4
192+
}

nbs/nbdev.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
project:
2+
output-dir: _docs
3+
4+
website:
5+
title: "ragas_annotator"
6+
site-url: "https://explodinggradients.github.io/ragas_annotator"
7+
description: "Experimental Ragas Evaluation UI and Library"
8+
repo-branch: main
9+
repo-url: "https://github.com/explodinggradients/ragas_annotator"

0 commit comments

Comments
 (0)