You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/source/installation.rst
+21-15Lines changed: 21 additions & 15 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -20,7 +20,7 @@ Installation Guide For: Users
20
20
The instructions below assume you have already installed `python <https://www.python.org/downloads/>`_, with the release version meeting the constraints set in the `Installation Requirements`_ section, and do not have a Python environment already active.
21
21
22
22
1. Verify your python version
23
-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
23
+
==============================
24
24
25
25
Ensure your python version meets the requirements from the `Installation Requirements`_ section using the following command:
26
26
@@ -34,12 +34,12 @@ If your current Python version is not supported by Schematic, you can switch to
34
34
You can double-check the current supported python version by opening up the `pyproject.toml <https://github.com/Sage-Bionetworks/schematic/blob/main/pyproject.toml#L39>`_ file in this repository and finding the supported versions of python in the script.
35
35
36
36
2. Set up your virtual environment
37
-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
37
+
===================================
38
38
39
39
Once you are working with a python version supported by `schematic`, you will need to activate a virtual environment within which you can install the package. Below we will show how to create your virtual environment either with ``venv`` or with ``conda``.
``conda`` is a powerful package and environment management tool that allows users to create isolated environments used particularly in data science and machine learning workflows. If you would like to manage your environments with ``conda``, continue reading:
55
55
@@ -74,7 +74,7 @@ Python 3 has built-in support for virtual environments with the ``venv`` module,
74
74
conda activate schematicpy
75
75
76
76
3. Install ``schematic`` dependencies
77
-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
77
+
======================================
78
78
79
79
Install the package using `pip <https://pip.pypa.io/en/stable/getting-started/>`_:
80
80
@@ -89,7 +89,7 @@ If you run into ``ERROR: Failed building wheel for numpy``, the error might be a
89
89
pip3 install --upgrade pip
90
90
91
91
4. Get your data model as a ``JSON-LD`` schema file
Now you need a schema file, e.g. ``model.jsonld``, to have a data model that schematic can work with. While you can download a super basic `example data model <https://raw.githubusercontent.com/Sage-Bionetworks/schematic/refs/heads/develop/tests/data/example.model.jsonld>`_, you'll probably be working with a DCC-specific data model. For non-Sage employees/contributors using the CLI, you might care only about the minimum needed artifact, which is the ``.jsonld``; locate and download only that from the right repo.
95
95
@@ -99,7 +99,7 @@ Here are some example repos with schema files:
Any function that interacts with a Google sheet (such as ``schematic manifest get``) requires Google Cloud credentials.
105
105
@@ -122,7 +122,7 @@ Once you have obtained credentials, be sure that the json file generated is name
122
122
.. _Set up configuration files:
123
123
124
124
6. Set up configuration files
125
-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
125
+
==============================
126
126
127
127
The following section will walk through setting up your configuration files with your credentials to allow for communication between ``schematic`` and the Synapse API.
128
128
@@ -131,6 +131,8 @@ There are two main configuration files that need to be created and modified:
131
131
- ``.synapseConfig``
132
132
- ``config.yml``
133
133
134
+
.. _create_synapse_config:
135
+
134
136
**Create and modify the .synapseConfig**
135
137
136
138
The ``.synapseConfig`` file is what enables communication between ``schematic`` and the Synapse API using your credentials. You can automatically generate a ``.synapseConfig`` file by running the following in your command line and following the prompts.
@@ -169,17 +171,19 @@ Once you have finished setting up your development environment using the instruc
169
171
170
172
Please note we have a `code of conduct <https://github.com/Sage-Bionetworks/schematic/blob/main/CODE_OF_CONDUCT.md>`_, please follow it in all your interactions with the project.
171
173
174
+
172
175
1. Clone the ``schematic`` package repository
173
-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
176
+
=============================================
174
177
175
178
For development, you will be working with the latest version of ``schematic`` on the repository to ensure compatibility between its latest state and your changes. Ensure your current working directory is where you would like to store your local fork before running the following command:
Install ``poetry`` (version 1.3.0 or later) using either the `official installer <https://python-poetry.org/docs/#installing-with-the-official-installer>`_ or ``pip``. If you have an older installation of Poetry, we recommend uninstalling it first.
185
189
@@ -193,8 +197,9 @@ Check to make sure your version of poetry is > v1.3.0
193
197
194
198
poetry --version
195
199
200
+
196
201
3. Start the virtual environment
197
-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
202
+
=================================
198
203
199
204
Change directory (``cd``) into your cloned ``schematic`` repository, and initialize the virtual environment using the following command with ``poetry``:
200
205
@@ -208,8 +213,9 @@ To make sure your poetry version and python version are consistent with the vers
208
213
209
214
poetry debug info
210
215
216
+
211
217
4. Install ``schematic`` dependencies
212
-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
218
+
======================================
213
219
214
220
Before you begin, make sure you are in the latest ``develop`` branch of the repository.
215
221
@@ -225,7 +231,7 @@ This command will install:
225
231
- Documentation dependencies such as ``sphinx`` for building and maintaining documentation.
226
232
227
233
5. Set up configuration files
228
-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
234
+
=================================
229
235
230
236
The following section will walk through setting up your configuration files with your credentials to allow for communication between ``schematic`` and the Synapse API.
231
237
@@ -281,7 +287,7 @@ Once you've copied the file, modify its contents according to your use case. For
281
287
``config.yml`` is ignored by git.
282
288
283
289
6. Obtain Google credential files
284
-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
290
+
==================================
285
291
286
292
Any function that interacts with a Google Sheet (such as ``schematic manifest get``) requires Google Cloud credentials.
287
293
@@ -307,6 +313,6 @@ Once you have obtained credentials, ensure that the JSON file generated is named
307
313
308
314
309
315
7. Verify your setup
310
-
~~~~~~~~~~~~~~~~~~~~
316
+
=====================
311
317
312
318
After running the steps above, your setup is complete, and you can test it in a ``python`` instance or by running a command based on the examples
0 commit comments