-
Notifications
You must be signed in to change notification settings - Fork 10
239 update developer setup documentation #240
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from 2 commits
f641cc9
3e462cf
bd5afbc
f45c7d5
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,9 @@ | ||
| # Developer Documentation | ||
|
|
||
| ## Environment Setup | ||
|
|
||
| This repository is entirely agnostic to how developers set up their development environments. There is a provided devcontainer configuration file and we suggest using a devcontainer to set up and isolate your development environment. | ||
|
|
||
| ## Installing Development Dependencies | ||
|
|
||
| Install development dependencies using `uv`` with all the extras groups: | ||
|
|
@@ -8,8 +12,14 @@ Install development dependencies using `uv`` with all the extras groups: | |
| # Install uv if you haven't already | ||
| curl -LsSf https://astral.sh/uv/install.sh | sh | ||
|
|
||
| # Load env vars and PATH settings | ||
| source $HOME/.local/bin/env | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is very environment dependent. In the devcontainer, this should be taken care of. Outside the devcontainer, it's the wild west and I don't think we can provide a suggestion to users. They just need to know their development environment. For example, I don't even have an env file in this location.
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Removed |
||
|
|
||
| # Install all dependencies including optional extras | ||
| uv sync --all-extras | ||
|
|
||
| # Activate the virtual environment | ||
| source .venv/bin/activate | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is up to user IDE configuration and how they want to use the virtual environment. Most IDEs will default to automatically activating the venv for new terminal sessions but users can manage that however they want to.
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Removed |
||
| ``` | ||
|
|
||
| Note: `uv` is a fast, Rust-based Python package installer and resolver that is PEP-compliant and fully compatible with pip and PyPI. | ||
|
|
@@ -18,10 +28,15 @@ Once the development dependencies are installed and the uv-generated `.venv` is | |
|
|
||
| ```bash | ||
| pre-commit install | ||
|
|
||
| # Linux / WSL (devcontainer) | ||
| sudo apt-get install -y libatomic1 | ||
| ``` | ||
|
|
||
| to get pre-commit hooks to automatically run the linting and formatting checks for you before each commit. | ||
|
|
||
| Authentication with Github is required to push to the repository. We suggest using SSH key authentication. | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm pretty sure Github won't let you use HTTPS any more so this is a basic standard requirement, not a recommendation by us.
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Removed |
||
|
|
||
| ## Testing | ||
|
|
||
| Testing is run with `pytest` and the order is randomized by `pytest-randomly`. | ||
|
|
@@ -31,20 +46,21 @@ To run all tests, run | |
| pytest tests | ||
| ``` | ||
|
|
||
| To run all tests in docker containers (tests against many versions of python), run | ||
|
|
||
| ```bash | ||
| docker-compose up --build && docker-compose down | ||
| ``` | ||
|
|
||
| ## Building Documentation with Sphinx | ||
|
|
||
| Documentation is automatically built on ReadTheDocs in response to every PR and release, | ||
| but you can also build it locally with: | ||
|
|
||
| ```bash | ||
| # From docs directory | ||
| make html && open build/html/index.html | ||
| make html | ||
|
|
||
| # macOS | ||
| open build/html/index.html | ||
|
|
||
| # Linux / WSL (devcontainer) | ||
| sudo apt install wslu | ||
| wslview build/html/index.html | ||
| ``` | ||
|
|
||
| ## Making a Pull Request | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we need to make a distinction in these docs that these steps are only required if a user is not using the devcontainer. If they are in the devcontainer, all of this setup should already be taken care of.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of providing environment setup, we state the repository is agnostic and instead suggest using the devcontainer
"This repository is entirely agnostic to how developers set up their development environments. There is a provided devcontainer configuration file and we suggest using a devcontainer to set up and isolate your development environment."