Skip to content

Commit 8ac7121

Browse files
Merge pull request #91 from CenterForOpenScience/release-on-pypi
Release on pypi
2 parents d18e2bf + e061bc0 commit 8ac7121

File tree

2 files changed

+19
-10
lines changed

2 files changed

+19
-10
lines changed

README.md

Lines changed: 18 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,29 +4,38 @@ This is a CLI tool for exporting research project data and files from the [OSF w
44

55
## Development Setup
66

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+
714
### Docker
815

916
You can setup a Docker container with this tool installed as a Python package:
1017

1118
1. [Install and setup Docker and Docker Desktop on your local machine](https://docs.docker.com/desktop/).
1219
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.
1421
4. Create a `.env` file and add your personal access token to it (see `.env.template`.)
1522
5. In the root of this repository, run `docker compose up --build -d` to setup a container.
1623
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`.)
1724

18-
### Virtual Environment
25+
## Installation
1926

20-
You could also setup a Python virtual environment (e.g. using virtualenv):
27+
### From PyPI: releases 0.1.4 and onwards
2128

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:
2630

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
2837

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.
3039

3140
## Usage
3241

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "osfexport"
3-
version = "0.1.3"
3+
version = "0.1.4"
44
authors = [
55
{ name="Benito Matischen", email="[email protected]" },
66
{ name="Ramiro Bravo", email="[email protected]" },

0 commit comments

Comments
 (0)