-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Initial basic API #2
Open
bdc34
wants to merge
28
commits into
master
Choose a base branch
from
develop
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This is to avoid conflicts with the arxiv. package from arxiv-base There is a way to resolve this conflict but it has just caused hassles during NG. So let's move away from that pattern.
Adds make_test_db.py
Can make a new submission, and it is written to legacy db. Adds make_test_db.py Simplifies Agent,User,Client
The install of the requirements.txt file is stange because I want to avoid installing the large dependency list from arxiv-base.
jonathanhyoung
approved these changes
Oct 2, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This project was started as a proof of concept and intendeds to replace the
legacy submit UI. The scope is limited to the UI to submit a paper to arxiv.org
and an API that the UI uses to record and modify submissions. It is also limited
to parity with the existing legacy system.
NG assessment
The "NG" project in 2016 at arxiv started a replacement for the submit system. A
barrier to modernizing submit was the question if the NG systems could be
quickly put into production. A review of that code found it to have technical
problems. From that: "The NG system cannot be put into immediate use. It has
flaws that demonstrate a misunderstanding with distributed software
development. It has restrictions on how it interoperates with the legacy
system. It also lacks a usable API to uniformly handle db and file CRUD." See
https://docs.google.com/document/d/1zGmJWdCn5HIJLCTJqPTrxcuMRgcmMzhLNCz0M9r4Jng/edit?usp=sharing
I presented my assessment and proposed mostly starting from scratch and that was
accepted. I hope to reuse isolated useful packages from NG.
API handles both metadata and files
To avoid race conditions related to the handling of files, the API will handle
both files and metadata. This is for simplicity. A hash based file set model was
considered and discarded. A hash based system is not excessively complicated,
but it is more complicated and the NG implementation indicate how easy it can go wrong.
Openapi schema via Fastapi
The new system is starting with a fastapi submission CRUD for paper metadata and
file upload. It took little time to get a bare-bones API working and the fastapi
swagger doc can be used as a primitive UI to submit a paper.
There are several mature libraries that can generate a client from the openapi
spec. This will elevate the writing of boilerplate seen in the NG projects.
Legacy API integration as v1
The API will start with an implementation that uses the legacy DB and legacy CIT
SFS as the backend. Once that is in place it can be run at CIT and the UI can
be served at CIT or from the cloud.
There is imperative to get a modernized submit version working ASAP and to not
gold plate the first version since any work put into the legacy is moribund Once
we have a modernized API and UI work can be done that will be forward-looking.
Future API implementation v2
Once the API is in operation it will provide a foundation to create a v2 API
that supports future needs.
Use and install of arxiv-base
The new submit does not use flask. It installs the arxiv-base package without
dependencies. This minimizes the size of the installation.
At this point, the new submit uses pydantic 2 and arxiv-base uses v1. So there
is a feature branch of arxiv-base modified to use pydantic v2 and work well
without flask. This will need to be merged to arxiv-base master soon.
Current state
Working
Not yet started
Very open to feedback
Would like to hear about:
{submission_id}/license
vs{submission_id}/setLicense
.ABC
and then filling that out for an implementation. Do you like this or dislikethis? I suspect we will soon want a non-legacy backend.
submit_ce/fastapi/config.py
which sets aImplementationConfig
which is used in the fastapi API definition of the service. The implementation can be changed by a env var.