This practice package repository is for our class to go through the process of;
- Creating a function
- Building documentation for the function
- Submitting a pull request
We will use uv
- Follow uv's installation scripts
- Now run
uv python install --default.
- You can see your available Python versions with
uv python list. - If you want a specific version of Python, you can run
uv python install 3.12,for example. - You can upgrade to the latest supported patch release for each version with
uv python upgrade.
- mkdocs-material with
uv pip install mkdocs-material --system - Guide on mkdocs-material and his companion website for this video
- However, we are using
uvand will useuv run mkdocs new .instead ofmkdocs new .
The --editable allows us to create an installation that points back to your project directory instead of copying the code into site-packages. With this, we can now edit the source files, and the installed package in the environment is automatically updated.
uv sync --editableWith this run you can now run the following command to evaluate the package within the package specific Python that has the package installed
uv run pythonBecause of the WATCH: options in the mkdocs.yml we can now make edits to our function details and see the edits in real time with
uv run mkdocs serveAfter you have the docs as you want you will need to build them to the docs folder for Github.
uv run mkdocs builduv pip install "git+https://github.com/byuirpytooling/simplefunctsp.git@main"pypackage_template
├── .readthedocs.yml ┐
├── CHANGELOG.md │
├── CONDUCT.md │
├── CONTRIBUTING.md │
├── docs │
│ ├── changelog.md │
│ ├── conduct.md │
│ ├── conf.py │
│ ├── contributing.md │ Package documentation
│ ├── example.ipynb │
│ ├── index.md │
│ ├── make.bat │
│ ├── Makefile │
│ └── requirements.txt │
├── LICENSE │
├── README.md ┘
├── pyproject.toml ┐
├── src │
│ └── pypackage_template │ Package source code, metadata,
│ ├── __init__.py │ and build instructions
│ └── pycounts.py ┘
└── tests ┐
└── test_pycounts.py ┘ Package tests