Skip to content

Commit 1073e49

Browse files
Merge pull request #1128 from expectedparrot/nb_sep3
Updating docs & nb
2 parents f826fc5 + 26658b2 commit 1073e49

11 files changed

+736
-5962
lines changed

docs/exceptions.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Help debugging
1212

1313
If you would like help debugging an error that you are encountering, please feel free to share your code, objects and exceptions report with us.
1414

15-
An easy way to do this is to post a notebook with your code to the :ref:`coop` and share the link with us at [email protected].
15+
An easy way to do this is to post a notebook with your code to the :ref:`coop` and **share the link with us at [email protected]**.
1616
You can use the following code to generate a link to your notebook:
1717

1818
.. code-block:: python
@@ -36,7 +36,7 @@ For example, you may intend for the answer to be formatted as a list but receive
3636
Or a question may be unanswered and the model has returned `None`.
3737
These exceptions are typically raised by the `Question` class and are subclassed from `QuestionAnswerValidationError`.
3838

39-
A useful starting point for debugging these exceptions is to check the `Settings` class for the `Questions` model.
39+
A useful starting point for debugging these exceptions is to check the `Settings` class for the `Questions` model (https://github.com/expectedparrot/edsl/blob/main/edsl/questions/settings.py).
4040
The default settings (which can be modified) are as follows:
4141

4242
.. code-block:: python

docs/filestore.rst

+30-24
Original file line numberDiff line numberDiff line change
@@ -3,27 +3,30 @@
33
File Store
44
==========
55

6-
`FileStore` is a module for storing and sharing data on the Coop that you want to use in your EDSL projects, such as survey data, PDFs, CSVs or images.
7-
It can be particularly useful for storing files to be used as as `Scenario` objects with a survey, and allows you to include code for retrieving and processing the files in your EDSL project.
6+
`FileStore` is a module for storing and sharing data on the Coop to use in EDSL projects, such as survey data, PDFs, CSVs, docs or images.
7+
It can be particularly useful for storing data intended to be used with surveys as `Scenario` objects, such as in data labeling tasks,
8+
and allows you to include code for retrieving and processing the data files in your EDSL project to facilitate collaboration and replication of results.
89

910

1011
File types
1112
----------
1213

13-
The following file types are supported by the FileStore:
14+
The following file types are currently supported by the FileStore:
1415

15-
- CSV
16-
- PDF
17-
- PNG
16+
* CSV
17+
* PDF
18+
* PNG (image)
1819

1920

2021
Posting a file
2122
--------------
2223

23-
To store a file, you need to create a `FileStore` object with the path to the file you want to store.
24-
You can then use the `push` method to store the file on the Coop and get a URL for accessing the file.
24+
To post a file, import the `FileStore` type (`CSVFileStore`, `PDFFileStore` or `PNGFileStore`) and create an object with the path to the file.
25+
Then call the `push` method to store the file on the Coop and get a URL and uuid for accessing it.
26+
You can optionally pass a `description` and `visibility` parameter to the `push` method (Coop objects can be *public*, *private* or *unlisted* by default).
2527

26-
CSV example:
28+
CSV example
29+
^^^^^^^^^^^
2730

2831
.. code-block:: python
2932
@@ -34,7 +37,7 @@ CSV example:
3437
print(info) # display the URL and Coop uuid of the stored file for retrieving it later
3538
3639
37-
Example output:
40+
Example output (showing the default description and visibility setting):
3841

3942
.. code-block:: python
4043
@@ -46,7 +49,8 @@ Example output:
4649
'visibility': 'unlisted'}
4750
4851
49-
PDF example:
52+
PDF example
53+
^^^^^^^^^^^
5054

5155
.. code-block:: python
5256
@@ -69,7 +73,8 @@ Example output:
6973
'visibility': 'unlisted'}
7074
7175
72-
PNG example:
76+
PNG example
77+
^^^^^^^^^^^
7378

7479
.. code-block:: python
7580
@@ -95,22 +100,22 @@ Example output:
95100
Retrieving and using a file
96101
---------------------------
97102

98-
To retrieve a file, you need to create a `FileStore` object with the Coop uuid of the file you want to retrieve.
99-
You can then use the `pull` method to retrieve the file from the Coop.
103+
To retrieve a file, create a `FileStore` object (`CSVFileStore`, `PDFFileStore` or `PNGFileStore`)
104+
and pass it the Coop uuid of the file you want to retrieve and the Expected Parrot URL.
105+
Then call the `pull` method to retrieve the file from the Coop.
100106

101-
Once you have retrieved a file, you can use it in your EDSL project as a `Scenario` object.
102-
Each file type has a method for converting the file into a scenario:
107+
Once retrieved, a file can be converted into scenarios by calling the relevant method on a `ScenarioList` object:
103108

104-
- `from_csv` for CSV files
105-
- `from_pdf` for PDF files
106-
- `from_image` for PNG files
109+
* `ScenarioList.from_csv()` for CSV files
110+
* `ScenarioList.from_pdf()` for PDF files
111+
* `ScenarioList.from_image()` for PNG files
107112

108113

109114
CSV example
110115
^^^^^^^^^^^
111116

112-
For CSV files we use the `from_csv` method of the `ScenarioList` class.
113-
They keys are the column names of the CSV file, which can be modified with the `rename` method.
117+
Here we retrieve the CSV file posted above and then convert it into a `ScenarioList` object with the `from_csv()` method.
118+
The keys are the column names of the CSV file, which can be modified with the `rename` method.
114119

115120
.. code-block:: python
116121
@@ -125,7 +130,7 @@ They keys are the column names of the CSV file, which can be modified with the `
125130
PDF example
126131
^^^^^^^^^^^
127132

128-
For PDF files we use the `from_pdf` method of the `ScenarioList` class.
133+
Here we retrieve the PDF file posted above and then convert it into a `ScenarioList` object with the `from_pdf()` method.
129134
The default keys are `filename`, `page`, `text`, which can be modified with the `rename` method.
130135

131136
.. code-block:: python
@@ -155,7 +160,8 @@ Output:
155160
PNG example
156161
^^^^^^^^^^^
157162

158-
For PNG files we use the `from_image` method which takes the PNG file and (optionally) the name of a key to use for the scenario object.
163+
Here we retrieve the PNG file posted above and then convert it into a `ScenarioList` object with the `from_image()` method.
164+
We can optionally pass the name of a key to use for the scenario object, or edit the key later.
159165

160166
.. code-block:: python
161167
@@ -170,7 +176,7 @@ For PNG files we use the `from_image` method which takes the PNG file and (optio
170176
Working with scenarios
171177
----------------------
172178

173-
Before using the scenario, verify the key and value of the scenario object (e.g., by printing), and rename the key as desired to use in survey questions.
179+
Before using the scenario, we can verify the key and value of the scenario object (e.g., by printing), and rename the key as desired to use in survey questions.
174180

175181
For a single `Scenario` we can check the key:
176182

docs/index.rst

+16-4
Original file line numberDiff line numberDiff line change
@@ -8,18 +8,27 @@ EDSL: AI-Powered Research
88
EDSL is developed by `Expected Parrot <https://www.expectedparrot.com>`_ and available under the MIT License.
99

1010
This page provides documentation, tutorials and demo notebooks for the EDSL package and the `Coop <https://www.expectedparrot.com/explore>`_: a platform for creating, storing and sharing AI research.
11-
The contents are organized into key sections to help you get started:
11+
The contents are organized into key sections to help you get started.
12+
13+
14+
Researchers
15+
-----------
16+
17+
**Are you using EDSL for a research project? We'd love to hear about your experience!**
18+
19+
Send us an email at [email protected] and we'll provide credits to run your project or a gift card for your time.
1220

1321

1422
Links
1523
-----
1624

1725
- Download the current version of EDSL at `PyPI <https://pypi.org/project/edsl>`_.
1826
- Get the latest EDSL updates at `GitHub <https://github.com/expectedparrot/edsl>`_.
19-
- Create a `Coop account <https://www.expectedparrot.com/login>`_ to store and share your research, and access special features:
27+
- Create a `Coop account <https://www.expectedparrot.com/login>`_ to store and share your research and access special features, including:
2028

2129
* :ref:`survey_builder`: An interface for launching hybrid human-AI surveys
22-
* :ref:`remote_inference` and :ref:`remote_caching`: Work with EDSL on the Expected Parrot server
30+
* :ref:`remote_inference`: Run surveys on the Expected Parrot server
31+
* :ref:`remote_caching`: Automatically store results and API calls on the Expected Parrot server
2332
* :ref:`filestore`: Store and share files for use in EDSL projects
2433

2534
- Explore research at the `Coop <https://www.expectedparrot.com/explore>`_.
@@ -33,14 +42,15 @@ Introduction
3342
- :ref:`overview`: An overview of the purpose, concepts and goals of the EDSL package.
3443
- :ref:`whitepaper`: A whitepaper about the EDSL package (*in progress*).
3544
- :ref:`citation`: How to cite the package in your work.
45+
- :ref:`papers`: Research papers and articles that use EDSL.
3646

3747

3848
Technical Setup
3949
---------------
4050

4151
- :ref:`installation`: Instructions for installing the EDSL package.
4252
- :ref:`coop`: Create, store and share research on the Expected Parrot server.
43-
- :ref:`api_keys`: Instructions for storing API keys to use EDSL locally.
53+
- :ref:`api_keys`: Instructions for storing API keys to use EDSL locally (*optional*).
4454

4555

4656
Getting Started
@@ -125,7 +135,9 @@ Information about additional functionality for developers.
125135
:hidden:
126136

127137
overview
138+
whitepaper
128139
citation
140+
papers
129141

130142
.. toctree::
131143
:maxdepth: 2

0 commit comments

Comments
 (0)