Files
primitive-type/docs/source/dev.rst
2026-02-10 12:55:16 +08:00

81 lines
1.8 KiB
ReStructuredText

Develop
=======
If you would like to participate in the development of this project or create your own fork, you can read this page to learn how to use `uv <https://docs.astral.sh/uv>`__ to manage the development environment.
Download the code
-----------------
The source code is mainly storaged at a self hosted `Gitea <https://about.gitea.com>`__ server `<https://gitfub.cv>`__ .
.. note::
Repo is not in GitHub!
Clone the code to your local develop environment by the command:
.. code-block:: shell
git clone https://gitfub.cv/CleMooling/primitive-type.git
Or if SSH configured fine:
.. code-block:: shell
git clone git@gitfub.cv:CleMooling/primitive-type.git
Sync the uv environment
-----------------------
If you just want to do tests, use:
.. code-block:: shell
uv sync
Then, activate the virtual environment managed by uv:
.. code-block:: shell
source .venv/bin/<activate_script>
.. note::
If you are using `bash <https://www.gnu.org/software/bash>`__ , the script is named ``activate``;
If you are using `fish <https://fishshell.com>`__ , the script is named ``activate.fish``;
If you are using `zsh <https://www.zsh.org>`__ , the script is named ``activate.zsh``.
Now you can do any test you like.
If you want to run the tests built-in, execute:
.. code-block:: shell
python -m unittest discover tests
or:
.. code-block:: shell
uv run python -m unittest discover tests
if outside the uv environment.
If you want to actually participate in the development of this project or fork yourself and develop, you should run:
.. code-block:: shell
uv sync --all-groups
It will sync all needed python packages, including packages that are being used to build the docs.
Then you can edit anything.
Finally
-------
Thanks for reading this documentation! I'll keep updating it to ensure the correctness.