|
1 | | -# 🚀 PyMC Labs Project Starter |
| 1 | +# embeddings_similarity_rating |
2 | 2 |
|
3 | | -All project code goes off the rails to some extent. |
4 | | -It happens in tiny increments with awkward commits that "solves the problem". |
5 | | -This is entirely forgivable when a codebase is not designed for the new problem and there are time constraints. |
6 | | -It is inevitable. |
| 3 | +*Description of the project/package. Make it super easy for people to understand what it does. Add links to external resources like Notion, SOWs, etc.if needed.* |
7 | 4 |
|
8 | | -However, this chaos can be mitigated with some decent guardrails. This **project template** provides the following: |
| 5 | +## Features |
| 6 | + |
| 7 | +*Bullet form list of the most important features of the project/package.* |
| 8 | + |
| 9 | +## Usage |
| 10 | + |
| 11 | +*How to use `embeddings_similarity_rating`. Include examples and code snippets.* |
| 12 | + |
| 13 | +## Project Structure |
| 14 | + |
| 15 | +- `embeddings_similarity_rating/`: Contains the package logic |
| 16 | +- `tests/`: Contains tests for the package |
| 17 | +- `notebooks/`: Contains exploratory code for testing new features |
| 18 | + |
| 19 | +## Development |
| 20 | + |
| 21 | +This package has been created with [pymc-labs/project-starter](https://github.com/pymc-labs/project-starter). It features: |
9 | 22 |
|
10 | 23 | - 📦 **`pixi`** for dependency and environment management. |
11 | 24 | - 🧹 **`pre-commit`** for formatting, spellcheck, etc. If everyone uses the same standard formatting, then PRs won't have flaky formatting updates that distract from the actual contribution. Reviewing code will be much easier. |
12 | 25 | - 🏷️ **`beartype`** for runtime type checking. If you know what's going in and out of functions just by reading the code, then it's easier to debug. And if these types are even enforced at runtime with tools like `beartype`, then there's a whole class of bugs that can never enter your code. |
13 | 26 | - 🧪 **`pytest`** for testing. Meanwhile, with `beartype` handling type checks, tests do not have to assert types, and can merely focus on whether the actual logic works. |
14 | 27 | - 🔄 **Github Actions** for running the pre-commit checks on each PR, automated testing and dependency management (dependabot). |
15 | 28 |
|
16 | | -## Usage |
17 | | - |
18 | | -This is a pretty minimal template, |
19 | | -that assumes you have opinions and may want to add/remove stuff too. |
20 | | -To use it as intended (not that you have to), |
21 | | -you should put your main model logic in the `package_name/models.py` file, |
22 | | -adjacent logic split into sibling files, |
23 | | -and then have a script that imports from `package_name` and runs the model, |
24 | | -e.g. in a `scripts/run_model.py` file, |
25 | | -or a notebook somewhere (e.g. in `experimentation`). |
26 | | - |
27 | 29 | ### Prerequisites |
28 | 30 |
|
29 | 31 | - Python 3.11 or higher |
30 | 32 | - [Pixi package manager](https://pixi.sh/latest/) |
31 | 33 |
|
32 | 34 | ### Get started |
33 | 35 |
|
34 | | -1. On GitHub, click on the green **Use this template** button, and create a new repository. |
35 | | -2. Git clone the new repository to your local machine. |
36 | | -3. Run the setup script `bash setup.sh` and follow the instructions. |
37 | | - |
38 | | -<video src="https://github.com/user-attachments/assets/4a1ab682-bdc6-4ac9-90ad-013157c1128d" controls></video> |
39 | | - |
40 | | -### Philosophy |
41 | | - |
42 | | -There are some example files in this repository. |
43 | | -Have a look at them. |
44 | | -Each of the files in `package_name` has a docstring that explains their role in your package. |
45 | | -You may not want to follow this dogma entirely, |
46 | | -but having split out the code for custom types, main model logic, preprocessing, string parsing, etc. |
47 | | -into separate files is always a good idea. |
48 | | -Mostly, however, you can use these as an example to build upon. |
49 | | - |
50 | | -And please contribute. If you add some guardrails that you think would be generally useful, please make a PR. |
| 36 | +1. Run `pixi install` to install the dependencies. |
| 37 | +2. Run `pixi r test` to run the tests. |
0 commit comments