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: README.md
+18-9Lines changed: 18 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,29 +4,38 @@ This is a CLI tool for exporting research project data and files from the [OSF w
4
4
5
5
## Development Setup
6
6
7
+
### Virtual Environment
8
+
9
+
1. Clone this repository onto your local machine.
10
+
2. Create a virtual environment to install dependencies. For virtualenv this is done with ``virtualenv <myenvname>``. Make sure your virtual environment is setup to use Python 3.12 or above (e.g., ``virtualenv <myenvname> --python="/usr/bin/python3.12"`` on Linux.)
11
+
3. From local Git repo: Activate your virtual environment and run ``pip install -e osfexport`` to install this repository as a modifiable package. Then install other requirements separately via `pip install -r requirements.txt`.
12
+
4. On the OSF website, create or log in to your account. Set up a personal access token (PAT) by going into your account settings, select `Personal access tokens` in the left side menu, and clicking `Create token`. You should give the token a name that helps you remember why you made it, like "PDF export", and choose the `osf.full_read` scope - this allows this token to read all public and private projects on your account. You can delete this token once you have finished exporting your projects.
13
+
7
14
### Docker
8
15
9
16
You can setup a Docker container with this tool installed as a Python package:
10
17
11
18
1.[Install and setup Docker and Docker Desktop on your local machine](https://docs.docker.com/desktop/).
12
19
2. Clone this repository onto your local machine.
13
-
3. On the OSF website, create or log in to your account. Set up a personal access token (PAT) by going into your account settings, selecting "Personal access tokens" in the left side menu, and clicking "Create token". You should give the token a name that helps you remember why you made it, like "PDF export", and choose the "osf.full_read" scope - this allows this token to read all public and private projects on your account. You can delete this token once you have finished exporting your projects.
20
+
3. On the OSF website, create or log in to your account. Set up a personal access token (PAT) by going into your account settings, select `Personal access tokens` in the left side menu, and clicking `Create token`. You should give the token a name that helps you remember why you made it, like "PDF export", and choose the `osf.full_read` scope - this allows this token to read all public and private projects on your account. You can delete this token once you have finished exporting your projects.
14
21
4. Create a `.env` file and add your personal access token to it (see `.env.template`.)
15
22
5. In the root of this repository, run `docker compose up --build -d` to setup a container.
16
23
6. Use `docker compose exec -it cli <commands>` to run CLI tool commands (e.g. `export-projects`) or run unit tests (i.e. `python -m unittest`.)
17
24
18
-
### Virtual Environment
25
+
##Installation
19
26
20
-
You could also setup a Python virtual environment (e.g. using virtualenv):
27
+
### From PyPI: releases 0.1.4 and onwards
21
28
22
-
1. Clone this repository onto your local machine.
23
-
2. Create a virtual environment, e.g., ``virtualenv myenv --python='"/usr/bin/python3.12"'``. Make sure your virtual environment is setup to use Python 3.12 or above.
24
-
3. From local Git repo: Activate your virtual environment and run ``pip install -e osfexport` to install this repository as a modifiable package. Then install other requirements separately via `pip install -r requirements.txt`.
25
-
4. On the OSF website, create or log in to your account. Set up a personal access token (PAT) by going into your account settings, selecting "Personal access tokens" in the left side menu, and clicking "Create token". You should give the token a name that helps you remember why you made it, like "PDF export", and choose the "osf.full_read" scope - this allows this token to read all public and private projects on your account. You can delete this token once you have finished exporting your projects.
29
+
Activate your virtual environment, for virtualenv this is done by:
26
30
27
-
## Installation
31
+
-`source <myenvname>/bin/activate` on Linux
32
+
-`<myenvname>\Scripts\activate` on Windows/Mac
33
+
34
+
Next, run `python -m pip install osfexport`. This will download and install this package and other dependencies from the PyPI index.
35
+
36
+
### From TestPyPi: releases before 0.1.4
28
37
29
-
From TestPyPI: Activate your virtual environment and run `#python -m pip install --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple osfexport`. This will download the packages needed from the PyPI index and the packaged version of this CLI tool on the TestPyPI index.
38
+
Activate your virtual environment and run `python -m pip install --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple osfexport`. This will download the packages needed from the PyPI index and the packaged version of this CLI tool on the TestPyPI index.
0 commit comments