Skip to content

Commit 0d74740

Browse files
committed
doc: add multiple setup options
1 parent 9fed7ce commit 0d74740

File tree

1 file changed

+59
-31
lines changed

1 file changed

+59
-31
lines changed

Diff for: CONTRIBUTING.rst

+59-31
Original file line numberDiff line numberDiff line change
@@ -102,51 +102,63 @@ and use Python's built-in web server for a preview in your web browser
102102

103103
python3 -m http.server --directory 'docs/_build/html'
104104

105+
Project Setup
106+
=============
105107

106-
Code Contributions
107-
==================
108+
Clone the repository
109+
--------------------
108110

109-
.. todo:: Please include a reference or explanation about the internals of the project.
111+
#. Create an user account on |the repository service| if you do not already have one.
112+
#. Fork the project repository_: click on the *Fork* button near the top of the
113+
page. This creates a copy of the code under your account on |the repository service|.
114+
#. Clone this copy to your local disk::
110115

111-
An architecture description, design principles or at least a summary of the
112-
main concepts will make it easy for potential contributors to get started
113-
quickly.
116+
git clone [email protected]:YourLogin/strawberry-sqlalchemy-mapper.git
117+
cd strawberry-sqlalchemy-mapper
114118

115-
Submit an issue
116-
---------------
119+
Install dependencies and plugins
120+
--------------------------------
117121

118-
Before you work on any non-trivial code contribution it's best to first create
119-
a report in the `issue tracker`_ to start a discussion on the subject.
120-
This often provides additional considerations and avoids unnecessary work.
122+
There are two ways to set up the environment for local development:
121123

122-
Create an environment
123-
---------------------
124+
#. Manual environment setup
124125

125-
Before you start coding, we recommend creating an isolated `virtual
126-
environment`_ to avoid any problems with your installed Python packages.
127-
This can easily be done via either |virtualenv|_::
126+
#. Dev Container setup
128127

129-
virtualenv <PATH TO VENV>
130-
source <PATH TO VENV>/bin/activate
128+
Method 1: Manual environment setup
129+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
131130

132-
or Miniconda_::
131+
#. Before you start coding, we recommend creating an isolated `virtual
132+
environment`_ to avoid any problems with your installed Python packages.
133+
This can easily be done via either |virtualenv|_::
133134

134-
conda create -n strawberry-sqlalchemy-mapper python=3 six virtualenv pytest pytest-cov
135-
conda activate strawberry-sqlalchemy-mapper
135+
virtualenv <PATH TO VENV>
136+
source <PATH TO VENV>/bin/activate
136137

137-
Clone the repository
138-
--------------------
138+
or Miniconda_::
139139

140-
#. Create an user account on |the repository service| if you do not already have one.
141-
#. Fork the project repository_: click on the *Fork* button near the top of the
142-
page. This creates a copy of the code under your account on |the repository service|.
143-
#. Clone this copy to your local disk::
140+
conda create -n strawberry-sqlalchemy-mapper python=3 six virtualenv pytest pytest-cov
141+
conda activate strawberry-sqlalchemy-mapper
144142

145-
git clone [email protected]:YourLogin/strawberry-sqlalchemy-mapper.git
146-
cd strawberry-sqlalchemy-mapper
143+
#. You should run::
147144

148-
Open the Dev Container
149-
----------------------
145+
pip install -U pip setuptools -e .
146+
147+
to be able to import the package under development in the Python REPL.
148+
149+
.. todo:: if you are not using pre-commit, please remove the following item:
150+
151+
#. Install |pre-commit|_::
152+
153+
pip install pre-commit
154+
pre-commit install
155+
156+
``strawberry-sqlalchemy-mapper`` comes with a lot of hooks configured to automatically help the
157+
developer to check the code being written.
158+
159+
160+
Method 2: Dev Container setup
161+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
150162

151163
#. Install `Dev Containers`_.
152164

@@ -160,6 +172,22 @@ Open the Dev Container
160172
#. Select the environment labeled 'poetry'.
161173

162174

175+
Code Contributions
176+
==================
177+
178+
.. todo:: Please include a reference or explanation about the internals of the project.
179+
180+
An architecture description, design principles or at least a summary of the
181+
main concepts will make it easy for potential contributors to get started
182+
quickly.
183+
184+
Submit an issue
185+
---------------
186+
187+
Before you work on any non-trivial code contribution it's best to first create
188+
a report in the `issue tracker`_ to start a discussion on the subject.
189+
This often provides additional considerations and avoids unnecessary work.
190+
163191
Implement your changes
164192
----------------------
165193

0 commit comments

Comments
 (0)