@@ -102,64 +102,93 @@ and use Python's built-in web server for a preview in your web browser
102
102
103
103
python3 -m http.server --directory 'docs/_build/html'
104
104
105
+ Project Setup
106
+ =============
105
107
106
- Code Contributions
107
- ==================
108
+ Clone the repository
109
+ --------------------
108
110
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::
110
115
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] :YOUR_USERNAME_HERE/strawberry-sqlalchemy-mapper.git
117
+ cd strawberry-sqlalchemy-mapper
114
118
115
- Submit an issue
116
- ---------------
119
+ Install dependencies and plugins
120
+ --------------------------------
117
121
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
+ .. todo :: Rewrite the following snippets to use the poetry environment rather than setuptools
121
123
122
- Create an environment
123
- ---------------------
124
+ There are two ways to set up the environment for local development:
124
125
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
+ #. Manual environment setup
128
127
129
- virtualenv <PATH TO VENV>
130
- source <PATH TO VENV>/bin/activate
128
+ #. Dev Container setup
131
129
132
- or Miniconda _::
130
+ Method 1: Manual environment setup
131
+ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
133
132
134
- conda create -n strawberry-sqlalchemy-mapper python=3 six virtualenv pytest pytest-cov
135
- conda activate strawberry-sqlalchemy-mapper
133
+ #. Before you start coding, we recommend creating an isolated `virtual
134
+ environment `_ to avoid any problems with your installed Python packages.
135
+ This can easily be done via either |virtualenv |_::
136
136
137
- Clone the repository
138
- --------------------
137
+ virtualenv <PATH TO VENV>
138
+ source <PATH TO VENV>/bin/activate
139
139
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
+ or Miniconda _::
144
141
145
- git clone [email protected] :YourLogin/ strawberry-sqlalchemy-mapper.git
146
- cd strawberry-sqlalchemy-mapper
142
+ conda create -n strawberry-sqlalchemy-mapper python=3 six virtualenv pytest pytest-cov
143
+ conda activate strawberry-sqlalchemy-mapper
147
144
148
- #. You should run::
145
+ #. You should run::
149
146
150
- pip install -U pip setuptools -e .
147
+ pip install -U pip setuptools -e .
151
148
152
- to be able to import the package under development in the Python REPL.
149
+ to be able to import the package under development in the Python REPL.
153
150
154
- .. todo:: if you are not using pre-commit, please remove the following item:
151
+ .. todo:: if you are not using pre-commit, please remove the following item:
152
+
153
+ #. Install |pre-commit |_::
154
+
155
+ pip install pre-commit
156
+ pre-commit install
157
+
158
+ ``strawberry-sqlalchemy-mapper`` comes with a lot of hooks configured to automatically help the
159
+ developer to check the code being written.
160
+
161
+
162
+ Method 2: Dev Container setup
163
+ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
164
+
165
+ #. Install `Dev Containers `_.
155
166
156
- #. Install | pre-commit |_::
167
+ #. Press `` Ctrl+Shift+P `` to open the command tab and enter `` Dev Containers: Open Folder in Container... ``.
157
168
158
- pip install pre-commit
159
- pre-commit install
169
+ #. Select the root directory of this repository.
170
+ Dev Containers will now install the environment dependencies as well as |pre-commit |_
171
+
172
+ #. When installation is complete, press ``Ctrl+Shift+P `` to open the command tab and enter ``Python Select Interpreter ``
173
+
174
+ #. Select the environment labeled 'poetry'.
175
+
176
+
177
+ Code Contributions
178
+ ==================
160
179
161
- ``strawberry-sqlalchemy-mapper`` comes with a lot of hooks configured to automatically help the
162
- developer to check the code being written.
180
+ .. todo :: Please include a reference or explanation about the internals of the project.
181
+
182
+ An architecture description, design principles or at least a summary of the
183
+ main concepts will make it easy for potential contributors to get started
184
+ quickly.
185
+
186
+ Submit an issue
187
+ ---------------
188
+
189
+ Before you work on any non-trivial code contribution it's best to first create
190
+ a report in the `issue tracker `_ to start a discussion on the subject.
191
+ This often provides additional considerations and avoids unnecessary work.
163
192
164
193
Implement your changes
165
194
----------------------
@@ -314,8 +343,8 @@ on PyPI_, the following steps can be used to release a new version for
314
343
.. |the repository service | replace :: GitHub
315
344
.. |contribute button | replace :: "Create pull request"
316
345
317
- .. _repository : https://github.com/<USERNAME> /strawberry-sqlalchemy-mapper
318
- .. _issue tracker : https://github.com/<USERNAME> /strawberry-sqlalchemy-mapper /issues
346
+ .. _repository : https://github.com/strawberry-graphql /strawberry-sqlalchemy
347
+ .. _issue tracker : https://github.com/strawberry-graphql /strawberry-sqlalchemy/issues
319
348
.. <-- end -->
320
349
321
350
@@ -329,6 +358,7 @@ on PyPI_, the following steps can be used to release a new version for
329
358
.. _contribution-guide.org : https://www.contribution-guide.org/
330
359
.. _creating a PR : https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-a-pull-request
331
360
.. _descriptive commit message : https://chris.beams.io/posts/git-commit
361
+ .. _Dev Containers : https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers
332
362
.. _docstrings : https://www.sphinx-doc.org/en/master/usage/extensions/napoleon.html
333
363
.. _first-contributions tutorial : https://github.com/firstcontributions/first-contributions
334
364
.. _flake8 : https://flake8.pycqa.org/en/stable/
0 commit comments