Skip to content

Commit 8aaa8a3

Browse files
committed
chore: adds license file
1 parent 6a4fd77 commit 8aaa8a3

2 files changed

Lines changed: 99 additions & 0 deletions

File tree

CONTRIBUTING.rst

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
Contribution guide
2+
==================
3+
4+
Setting up the environment
5+
--------------------------
6+
7+
1. Install `PDM <https://pdm.fming.dev/latest/>`_
8+
2. Run ``pdm install -G:all`` to create a `virtual environment <https://docs.python.org/3/tutorial/venv.html>`_ and install
9+
the dependencies
10+
3. If you're working on the documentation and need to build it locally, install the extra dependencies with ``pdm install -G:docs``
11+
4. Install `pre-commit <https://pre-commit.com/>`_
12+
5. Run ``pre-commit install`` to install pre-commit hooks
13+
14+
Code contributions
15+
------------------
16+
17+
Workflow
18+
++++++++
19+
20+
1. `Fork <https://github.com/cofin/litestar-vite/fork>`_ the `Advanced Alchemy repository <https://github.com/cofin/litestar-vite>`_
21+
2. Clone your fork locally with git
22+
3. `Set up the environment <#setting-up-the-environment>`_
23+
4. Make your changes
24+
5. (Optional) Run ``pre-commit run --all-files`` to run linters and formatters. This step is optional and will be executed
25+
automatically by git before you make a commit, but you may want to run it manually in order to apply fixes
26+
6. Commit your changes to git
27+
7. Push the changes to your fork
28+
8. Open a `pull request <https://docs.github.com/en/pull-requests>`_. Give the pull request a descriptive title
29+
indicating what it changes. If it has a corresponding open issue, the issue number should be included in the title as
30+
well. For example a pull request that fixes issue ``bug: Increased stack size making it impossible to find needle #100``
31+
could be titled ``fix(#100): Make needles easier to find by applying fire to haystack``
32+
33+
.. tip:: Pull requests and commits all need to follow the
34+
`Conventional Commit format <https://www.conventionalcommits.org>`_
35+
36+
Guidelines for writing code
37+
----------------------------
38+
39+
- All code should be fully `typed <https://peps.python.org/pep-0484/>`_. This is enforced via
40+
`mypy <https://mypy.readthedocs.io/en/stable/>`_.
41+
- All code should be tested. This is enforced via `pytest <https://docs.pytest.org/en/stable/>`_.
42+
- All code should be properly formatted. This is enforced via `black <https://black.readthedocs.io/en/stable/>`_ and `Ruff <https://beta.ruff.rs/docs/>`_.
43+
44+
Writing and running tests
45+
+++++++++++++++++++++++++
46+
47+
.. todo:: Write this section
48+
49+
Project documentation
50+
---------------------
51+
52+
The documentation is located in the ``/docs`` directory and is `ReST <https://docutils.sourceforge.io/rst.html>`_ and
53+
`Sphinx <https://www.sphinx-doc.org/en/master/>`_. If you're unfamiliar with any of those,
54+
`ReStructuredText primer <https://www.sphinx-doc.org/en/master/lib/usage/restructuredtext/basics.html>`_ and
55+
`Sphinx quickstart <https://www.sphinx-doc.org/en/master/lib/usage/quickstart.html>`_ are recommended reads.
56+
57+
Running the docs locally
58+
++++++++++++++++++++++++
59+
60+
To run or build the docs locally, you need to first install the required dependencies:
61+
62+
``pdm install -G:docs``
63+
64+
Then you can serve the documentation with ``make docs-serve``, or build them with ``make docs``.
65+
66+
Creating a new release
67+
----------------------
68+
69+
1. Increment the version in `pyproject.toml <https://github.com/cofin/litestar-vite/blob/main/pyproject.toml>`_.
70+
.. note:: The version should follow `semantic versioning <https://semver.org/>`_ and `PEP 440 <https://www.python.org/dev/peps/pep-0440/>`_.
71+
2. `Draft a new release <https://github.com/cofin/litestar-vite/releases/new>`_ on GitHub
72+
73+
* Use ``vMAJOR.MINOR.PATCH`` (e.g. ``v1.2.3``) as both the tag and release title
74+
* Fill in the release description. You can use the "Generate release notes" function to get a draft for this
75+
3. Commit your changes and push to ``main``
76+
4. Publish the release
77+
5. Go to `Actions <https://github.com/cofin/litestar-vite/actions>`_ and approve the release workflow
78+
6. Check that the workflow runs successfully

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2023 Cody Fincher
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

0 commit comments

Comments
 (0)