aboutsummaryrefslogtreecommitdiffstats
path: root/rust
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@robocracy.org>2018-05-25 19:44:15 -0700
committerBryan Newbold <bnewbold@robocracy.org>2018-05-25 19:44:15 -0700
commit9b3e52e813bbd9dc9b1771ca2c63e33d93048e97 (patch)
tree24e266a67d458f4335b38737497bbb5f18152a73 /rust
parentf3523b1d900e19911bf0041ac1c75877b0bfc943 (diff)
downloadfatcat-9b3e52e813bbd9dc9b1771ca2c63e33d93048e97.tar.gz
fatcat-9b3e52e813bbd9dc9b1771ca2c63e33d93048e97.zip
update README and TODOlast-golang
Diffstat (limited to 'rust')
-rw-r--r--rust/README.md21
-rw-r--r--rust/TODO47
2 files changed, 48 insertions, 20 deletions
diff --git a/rust/README.md b/rust/README.md
index 78adfc48..e790c425 100644
--- a/rust/README.md
+++ b/rust/README.md
@@ -5,12 +5,16 @@ Rust implementation of fatcat API server (`fatcatd`).
- HTTP API
- [ ] base32 encoding of UUID identifiers
+ - [ ] inverse many-to-many helpers (files-by-release, release-by-creator)
- SQL Schema
- [x] Basic entities
- - [ ] one-to-many and many-to-many entities
- - [ ] JSON(B) "extra" metadata fields
+ - [x] one-to-many and many-to-many entities
+ - [x] JSON(B) "extra" metadata fields
+ - [ ] full rev1 schema for all entities
+ - [ ] editgroup review: comments? actions?
- Web Interface
- [ ] Migrate Python codebase
+ - [ ] Creation and editing of all entities
- Other
- [x] Basic logging
- [x] Swagger-UI
@@ -18,6 +22,7 @@ Rust implementation of fatcat API server (`fatcatd`).
- [ ] Metrics
- [ ] Authentication (eg, accounts, OAuth2, JWT)
- [ ] Authorization (aka, roles)
+ - [ ] bot vs. editor
## Development
@@ -83,17 +88,11 @@ On a bare server, as root:
### Special Tricks
-Regenerate API schemas:
+Regenerate API schemas (this will, as a side-effect, also run `cargo fmt` on
+the whole project, so don't run it with your editor open):
cargo install cargo-swagger # uses docker
- cargo swagger fatcat-openapi2.yml fatcat-api --docker-tag=v2.3.1
- sudo chown `whoami`:`whoami` -R fatcat-api
-
- # usually want to keep our changes to sub-module toml
- git checkout fatcat-api/Cargo.toml
-
- cargo fmt
- # git commit the fatcat-api directory at this point
+ ./codegen_openapi2.sh
Regenerate SQL schema:
diff --git a/rust/TODO b/rust/TODO
index 86f17c22..6f5600d9 100644
--- a/rust/TODO
+++ b/rust/TODO
@@ -10,16 +10,45 @@ x clean up blasse error handling a bit
x add 404s to gets
x wow. fix a bunch of api schema names ("FindASingleContainerByExternalIdentifer")
x refactor handlers to have a proper Result<_,_> error-chain type, so I can use '?'
-- one-to-many relationship (eg, works)
-- many-to-many relationship (eg, creators)
-- creators, releases, works, files (?)
-- copypasta a bunch of CRUD
-- helper to calculate state of idents
-
-then:
+x move python to subdirectory
+x rename binary
+x copypasta a bunch of CRUD
+x swagger endpoint
+x helper to calculate 'state' of idents
+x tests for orcid and issn lookups
+x editgroup helper (for POST)
+x creators, releases, works, files
+x editgroup accept
+x edits, groups, etc
+x JSON
+x one-to-many relationship (eg, works)
+x more dummy data (tests the schema)
x encode the remaining entities in SQL
x openapi for other entities (heavily templated)
-- figure out JSON(B) in both swagger and diesel
+x testing framework
+x file/release relation
+x refactor tests (response check, setup)
+x better test coverage (all entity types, get and post)
+x editgroup GET API schema arrays
later:
-- metrics, jwt, config, sentry, testing
+- generate python client library?
+- web interface?
+- editgroup: state to track review status?
+- all those python tests
+- enforce "no editing if editgroup accepted" behavior
+- refactor entity creation/editing (DRY)
+- refactor to allow Result<> in all handlers
+- real auth
+- metrics, jwt, config, sentry
+- ansible/deployment/DNS story
+- refactor logging; use slog
+
+schema/api questions:
+- url table (for files)
+- get works/releases by creator
+- "types"
+- define release field stuff
+- what should entity POST return? include both the entity and the edit?
+- PUTs (updates) to entities
+