---
jupytext:
  formats: ipynb,md:myst
  notebook_metadata_filter: all
  text_representation:
    extension: .md
    format_name: myst
    format_version: 0.13
    jupytext_version: 1.13.0
kernelspec:
  display_name: Python 3 (phys-581)
  language: python
  name: phys-581
---

(assignment3)=
# Assignment 3: Project

The goal of this assignment is to get you prepared for your project.  Please have your
skeleton ready for review by the end of **Wednesday 22 October 2025**.

## Requirements

Your project should have the following.

1. A **master repository** on [GitLab][] with a **README.md** file describing your
   plan.
2. **[Pixi][] environment** so that users can build and activate your reproducible
   computing environment.  Specifically, the following should work.
   * `pixi install`: Install all the packages and build the environment.
   * `pixi shell`: Launch a shell with the environment active for use.
   * `pixi lock`: Update the lock file so it can be committed to enable reproducible
     computing.
   * `pixi clean`: Clean up all environments etc.
   
   [Tasks][pixi task] defined to do the following:
   
   * `pixi test`: Run all tests in the appropriate environment.
   * `pixi doc-server`: Start the documentation server.
3. **Source code** that does something.  This can be stubs at this point if you
   don't have something else -- for example, define a function `Fib(n)` that returns the n'th
   Fibonacci number.
4. **Comprehensive tests** with greater than 85% code coverage.  Note: for now these might
   fail since you may not have written your code, but please make sure you have some
   tests.  You should be able to run these with `pytest` which you can do with a [pixi
   task][]. 
5. **[MyST][] documentation** that demonstrates what your code does by actually executing
   your code.  You should be able to start the document server with `myst start
   --execute` which you can do with a [pixi task][].
   
The following are required, but need not be completed by Wednesday.

6. **CI Tests**: Continuous integration running your tests so that results reported in your
   documentation. (In your `README.md` file is fine.)
7. **CI Documentation**: Continuous integrate building and serving your documentation
   on e.g. [ReadTheDocs][], [GitLab pages][], or similar.

Please submit the URL for your repository to me by the end of **Wednesday 22 October
2025**.  I will clone your repo and expect to be able to build your environment, run
your tests, and build and view your documentation.

## Details

:::{margin}
The [discussion forum][] is just a repository with no code and only the issue tracker
enabled.
:::
If you encounter any issues, please open an issue on the class discussion forum:

* [WSU Courses/Physics 581-2025/discussions][discussion forum]

Send <m.forbes+581@wsu.edu> a note with your GitLab username if you need access.

:::{important}
Please use the official documentation to complete these tasks.  Try not to rely on AI,
StackOverflow, etc. (you will not learn as much).  Specifically:

* [Pixi][]
* [MyST][]
* [pytest][]
* [Python documentation][]

The goal is not to be a robot, but to think carefully about what you are doing so you
can branch out as needed.
:::


## Acceptable Variants

* [GitHub][] instead of [GitLab][].
* Alternatives to [Pixi][], as long as you have the same functionality.  For example,
  you could provide this through a `Makefile` (e.g. [Forbes Group / Cookiecutters][]).
  :::{margin}
  Note that [Jupyter Book][] is being migrated to [MyST][], so for long-term support,
  you should try to migrate.
  :::
* If [MyST][] does not provide enough flexibility, you could base your documentation
  with another system like [Jupyter Book][], [Doxygen][], [DOC++][], etc.
* Other testing platforms can be used like [Catch2][] for C++, but consider hooking into
  [pytest][] with e.g. [`pytest-cpp`][].
  


[GitLab]: <https://gitlab.com>
[GitHub]: <https://github.com>
[Pixi]: <https://pixi.sh/>
[Forbes Group / Cookiecutters]: <https://gitlab.com/forbes-group/cookiecutters>
[MyST]: <https://mystmd.org/>
[pixi task]: <https://pixi.sh/latest/reference/cli/pixi/task/>
[Jupyter Book]: <https://jupyterbook.org>
[Doxygen]: <https://www.doxygen.nl/>
[DOC++]: <https://docpp.sourceforge.net/>
[Catch2]: <https://github.com/catchorg/Catch2>
[`pytest-cpp`]: <https://github.com/pytest-dev/pytest-cpp>
[ReadTheDocs]: <readthedocs.org/>
[GitLab pages]: <https://docs.gitlab.com/user/project/pages/>
[pytest]: <https://docs.pytest.org>
[Python documentation]: <https://docs.python.org/3/>
[WSU Courses/Physics 581-2025/discussions]: <https://gitlab.com/wsu-courses/physics-581-2025/discussions>
[discussion forum]: <https://gitlab.com/wsu-courses/physics-581-2025/discussions>
