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: .github/ISSUE_TEMPLATE/new-source.md
+7-7Lines changed: 7 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -15,21 +15,21 @@ assignees: ''
15
15
16
16
You can do some of these tasks in parallel, specially if you need to wait for approval, but it's good to keep in mind the intended order:
17
17
18
-
*[ ] Make a branch in [ShareYourCloning_LinkML](https://github.com/genestorian/ShareYourCloning_LinkML) where you implement the new source (see extra docs in there) on how to do this.
19
-
*[ ] Add your branch as a dependency (via commit id) using poetry in this repository, to update `shareyourcloning-linkml` dependency in `pyproject.toml`:
18
+
*[ ] Make a branch in [OpenCloning_LinkML](https://github.com/genestorian/OpenCloning_LinkML) where you implement the new source (see extra docs in there) on how to do this.
19
+
*[ ] Add your branch as a dependency (via commit id) using poetry in this repository, to update `opencloning-linkml` dependency in `pyproject.toml`:
* [ ] Implement the new sourcein a branch in this repository. You will need to add a new endpoint in`main.py` and a new class in`pydantic_models.py` that will handle the new source. You can use the existing sources as a template. Note that you can add extra validation or methods (see examples as well).
24
24
* [ ] Write tests forthe new sourcein`tests/test_endpoints.py`. You can use the existing tests as a template.
25
-
* [ ] Once the tests pass, merge the PR of the new sourcein [ShareYourCloning_LinkML] and make a release of the `shareyourcloning-linkml` package.
25
+
* [ ] Once the tests pass, merge the PR of the new sourcein [OpenCloning_LinkML] and make a release of the `opencloning-linkml` package.
26
26
* [ ] Update the dependency in the branch of this repository repository to the new version.
27
27
```bash
28
-
# Get version from https://pypi.org/project/shareyourcloning-linkml/
28
+
# Get version from https://pypi.org/project/opencloning-linkml/
* [ ] Implement the frontend functionality in a branch, following [the frontend wiki](https://github.com/manulera/ShareYourCloning_frontend/wiki/Checklist-%E2%80%90--adding-a-source).
32
+
* [ ] Implement the frontend functionality in a branch, following [the frontend wiki](https://github.com/manulera/OpenCloning_frontend/wiki/Checklist-%E2%80%90--adding-a-source).
33
33
* [ ] Make tests for the frontend functionality.
34
34
* [ ] Merge the PR in this repository into master.
35
35
* [ ] Update the backend submodule in the frontend repository to the latest master.
This API is part of a bigger application, before going further, please go to the [main project readme](https://github.com/manulera/ShareYourCloning), where you can find an introduction.
6
+
This API is part of a bigger application, before going further, please go to the [main project readme](https://github.com/manulera/OpenCloning), where you can find an introduction.
7
7
8
8
This python API is built with [FastAPI](https://fastapi.tiangolo.com/) and is for *in silico* cloning.
This API provides a series of entry points. The API documentation can be accessed [here](https://shareyourcloning.api.genestorian.org/docs). You can use the documentation page to try some request directly on the browser. Otherwise, the API is open for you to make requests from a python script or command line at: [https://shareyourcloning.api.genestorian.org/](https://shareyourcloning.api.genestorian.org/).
14
+
This API provides a series of entry points. The API documentation can be accessed [here](https://OpenCloning.api.genestorian.org/docs). You can use the documentation page to try some request directly on the browser. Otherwise, the API is open for you to make requests from a python script or command line at: [https://opencloning.api.genestorian.org/](https://opencloning.api.genestorian.org/).
15
15
16
16
## Getting started
17
17
18
-
If you want to quickly set up a local instance of the frontend and backend of the application, check [getting started in 5 minutes](https://github.com/manulera/ShareYourCloning#timer_clock-getting-started-in-5-minutes) in the main repository.
18
+
If you want to quickly set up a local instance of the frontend and backend of the application, check [getting started in 5 minutes](https://github.com/manulera/OpenCloning#timer_clock-getting-started-in-5-minutes) in the main repository.
19
19
20
20
### Running locally
21
21
@@ -27,9 +27,9 @@ python -m venv .venv
27
27
# Activate the virtual environment
28
28
source .venv/bin/activate
29
29
# Install the package from github (will be in pypi at some point)
30
-
pip install shareyourcloning
30
+
pip install opencloning
31
31
# Run the API (uvicorn should be installed in the virtual environment)
32
-
uvicorn shareyourcloning.main:app
32
+
uvicorn opencloning.main:app
33
33
```
34
34
35
35
### Running locally if you want to contribute
@@ -56,61 +56,61 @@ Now you should be able to run the api by running:
56
56
57
57
```bash
58
58
# The --reload argument will reload the API if you make changes to the code
Then you should be able to open the API docs at [http://127.0.0.1:8000/docs](http://127.0.0.1:8000/docs) to know that your API is working.
63
63
64
64
### Running locally with docker :whale:
65
65
66
-
If you want to serve the full site (backend and frontend) with docker, check [getting started in 5 minutes](https://github.com/manulera/ShareYourCloning#timer_clock-getting-started-in-5-minutes) in the main repository.
66
+
If you want to serve the full site (backend and frontend) with docker, check [getting started in 5 minutes](https://github.com/manulera/OpenCloning#timer_clock-getting-started-in-5-minutes) in the main repository.
67
67
68
-
If you want to serve only the backend from a docker container, an image is available at [manulera/shareyourcloningbackend](https://hub.docker.com/r/manulera/shareyourcloningbackend). The image is built from the Dockerfile in the root of this repository and exposes the port 3000. To run it:
68
+
If you want to serve only the backend from a docker container, an image is available at [manulera/opencloningbackend](https://hub.docker.com/r/manulera/opencloningbackend). The image is built from the Dockerfile in the root of this repository and exposes the port 3000. To run it:
69
69
70
70
```bash
71
-
docker build -t manulera/shareyourcloningbackend.
72
-
docker run -d --name backendcontainer -p 8000:8000 manulera/shareyourcloningbackend
71
+
docker build -t manulera/opencloningbackend.
72
+
docker run -d --name backendcontainer -p 8000:8000 manulera/opencloningbackend
73
73
74
74
```
75
75
76
-
If you don't want to download the repository and build the image, you can fetch the latest image from dockerhub (same image that is used in [https://shareyourcloning.api.genestorian.org/](https://shareyourcloning.api.genestorian.org/))
76
+
If you don't want to download the repository and build the image, you can fetch the latest image from dockerhub (same image that is used in [https://opencloning.api.genestorian.org/](https://opencloning.api.genestorian.org/))
77
77
78
78
```bash
79
-
docker pull manulera/shareyourcloningbackend
80
-
docker run -d --name backendcontainer -p 8000:8000 manulera/shareyourcloningbackend
79
+
docker pull manulera/opencloningbackend
80
+
docker run -d --name backendcontainer -p 8000:8000 manulera/opencloningbackend
81
81
```
82
82
83
83
The api will be running at `http://localhost:8000`, so you should be able to access the docs at [http://localhost:8000/docs](http://localhost:8000/docs).
84
84
85
85
### Connecting to the frontend
86
86
87
-
If you want to receive requests from the [frontend](https://github.com/manulera/ShareYourCloning_frontend), or from another web application you may have to include the url of the frontend application in the CORS exceptions. By default, if you run the dev server with `uvicorn shareyourcloning.main:app --reload --reload-exclude='.venv'`, the backend will accept requests coming from `http://localhost:3000`, which is the default address of the frontend dev server (ran with `yarn start`).
87
+
If you want to receive requests from the [frontend](https://github.com/manulera/OpenCloning_frontend), or from another web application you may have to include the url of the frontend application in the CORS exceptions. By default, if you run the dev server with `uvicorn opencloning.main:app --reload --reload-exclude='.venv'`, the backend will accept requests coming from `http://localhost:3000`, which is the default address of the frontend dev server (ran with `yarn start`).
88
88
89
89
If you want to change the allowed origins, you can do so via env variables (comma-separated). e.g.:
Similarly, the frontend should be configured to send requests to the backend address, [see here](https://github.com/manulera/ShareYourCloning_frontend#connecting-to-the-backend).
95
+
Similarly, the frontend should be configured to send requests to the backend address, [see here](https://github.com/manulera/OpenCloning_frontend#connecting-to-the-backend).
96
96
97
97
#### Serving the frontend from the backend
98
98
99
99
You may prefer to handle everything from a single server. You can do so by:
100
-
* Build the [frontend](https://github.com/manulera/ShareYourCloning_frontend) with `yarn build`.
100
+
* Build the [frontend](https://github.com/manulera/OpenCloning_frontend) with `yarn build`.
101
101
* Copy the folder `build` from the frontend to the root directory of the backend, and rename it to `frontend`.
102
102
* Set the environment variable `SERVE_FRONTEND=1` when running the backend. By default this will remove all allowed origins, but you can still set them with `ALLOWED_ORIGINS`.
103
103
* Set the value of `backendUrl` in `frontend/config.js` to `/`.
104
104
* Now, when you go to the root of the backend (e.g. `http://localhost:8000`), you should receive the frontend instead of the greeting page of the API.
105
105
106
-
You can see how this is done in this [docker image](https://github.com/manulera/ShareYourCloning/blob/master/Dockerfile) and [docker-compose file](https://github.com/manulera/ShareYourCloning/blob/master/docker-compose.yml).
106
+
You can see how this is done in this [docker image](https://github.com/manulera/OpenCloning/blob/master/Dockerfile) and [docker-compose file](https://github.com/manulera/OpenCloning/blob/master/docker-compose.yml).
107
107
108
108
## Contributing :hammer_and_wrench:
109
109
110
-
Check [contribution guidelines in the main repository](https://github.com/manulera/ShareYourCloning/blob/master/CONTRIBUTING.md) for general guidelines.
110
+
Check [contribution guidelines in the main repository](https://github.com/manulera/OpenCloning/blob/master/CONTRIBUTING.md) for general guidelines.
111
111
112
112
For more specific tasks:
113
-
* Creating a new type of source: follow the [new source issue template](.github/ISSUE_TEMPLATE/new-source.md). You can create an issue like that [here](https://github.com/manulera/ShareYourCloning_backend/issues/new?assignees=&labels=new-source&projects=&template=new-source.md&title=New+source%3A+%3Cname-of-source%3E).
113
+
* Creating a new type of source: follow the [new source issue template](.github/ISSUE_TEMPLATE/new-source.md). You can create an issue like that [here](https://github.com/manulera/OpenCloning_backend/issues/new?assignees=&labels=new-source&projects=&template=new-source.md&title=New+source%3A+%3Cname-of-source%3E).
114
114
115
115
## Running the tests locally
116
116
@@ -132,7 +132,7 @@ For the frontend, it may be useful to produce stubs (I use them for writing the
132
132
by looking at the `RecordStubRoute` class in `api_config_utils.py`. To run the dev server and record stubs:
Copy file name to clipboardExpand all lines: examples/snapgene_history/readme.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -25,7 +25,7 @@ You can see it in the SnapGene history of `final_plasmid.dna` if you open with s
25
25
26
26

27
27
28
-
The equivalent history is built with ShareYourCloning with the script `build_history.py`, and stored as json in `history.json`. The only difference in this case is that ase1 is loaded directly from GenBank instead of loaded from a file (I actually loaded from GenBank with SnapGene, but it does not register this in the history).
28
+
The equivalent history is built with OpenCloning with the script `build_history.py`, and stored as json in `history.json`. The only difference in this case is that ase1 is loaded directly from GenBank instead of loaded from a file (I actually loaded from GenBank with SnapGene, but it does not register this in the history).
0 commit comments