Skip to content
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

Add first Rust tools #31

Merged
merged 69 commits into from
Nov 14, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
69 commits
Select commit Hold shift + click to select a range
e9842a3
Start working on new parser
stijndcl Oct 2, 2023
29ad6cb
Choose right version
stijndcl Oct 2, 2023
4214809
Merge branch 'unipept:master' into feature/rust-xml-parser
stijndcl Oct 2, 2023
18ff3af
Fix naming
stijndcl Oct 3, 2023
3a1497e
Add comments
stijndcl Oct 3, 2023
196b77a
Remove todo item
stijndcl Oct 3, 2023
21f8497
Add support for multiple threads
stijndcl Oct 4, 2023
b4b756a
Run clippy
stijndcl Oct 4, 2023
fce5010
Minimize IO locks, fix default value
stijndcl Oct 4, 2023
a9eb80f
Undo locks
stijndcl Oct 4, 2023
ee4ef1c
Clean up imports
stijndcl Oct 4, 2023
06b97f8
First version of FA
stijndcl Oct 4, 2023
0e7ebc9
Remove raw string
stijndcl Oct 4, 2023
cc56c09
Use new uniprot.rs version
stijndcl Oct 5, 2023
625d9c0
Create new binary
stijndcl Oct 11, 2023
d93e007
Work on parsing
stijndcl Oct 11, 2023
6a6bc37
Parse taxons
stijndcl Oct 11, 2023
8b1db93
Fight with the borrow checker
stijndcl Oct 11, 2023
2ac67ae
Fix more todos
stijndcl Oct 11, 2023
5667d64
Fix typo
stijndcl Oct 11, 2023
9df23f7
Parse enum
stijndcl Oct 12, 2023
84d73e7
Create macro
stijndcl Oct 12, 2023
dacd36b
Finish parser & fix small bugs
stijndcl Oct 12, 2023
ef7ea78
Pin version to commit instead of branch
stijndcl Oct 16, 2023
6a3b967
Merge pull request #1 from stijndcl/feature/xml-parser-updated-library
stijndcl Oct 16, 2023
770701f
Merge pull request #2 from stijndcl/feature/rust-fa
stijndcl Oct 16, 2023
7dc1f13
Merge pull request #3 from stijndcl/feature/rust-uniprots-2-tables
stijndcl Oct 16, 2023
ac36915
Re-structure project
stijndcl Oct 16, 2023
d744cc7
Fix TODO
stijndcl Oct 16, 2023
6ec08ff
Add notes about speed increase
stijndcl Oct 16, 2023
980c32b
Remove re-used code
stijndcl Oct 18, 2023
6713e08
Move code around, upgrade to 0.7.0
stijndcl Oct 19, 2023
8793c75
Merge pull request #4 from stijndcl/feature/re-organise
stijndcl Oct 19, 2023
fc0ef2e
Add github actions
stijndcl Oct 19, 2023
a17a80c
Fix path
stijndcl Oct 19, 2023
7f778f8
Apply formatting
stijndcl Oct 19, 2023
29eef93
Use shared cache key
stijndcl Oct 19, 2023
6c954e1
Add permissions
stijndcl Oct 19, 2023
d9f58b1
Add workdir
stijndcl Oct 19, 2023
2e85db8
Remove idea folder
stijndcl Oct 19, 2023
fb2d04b
Linting
stijndcl Oct 19, 2023
79985af
Formatting
stijndcl Oct 19, 2023
f043c15
Merge pull request #5 from stijndcl/ci/actions
stijndcl Oct 19, 2023
1e2db0e
Use minified function
stijndcl Oct 19, 2023
32a4b10
Optimize ID splitting
stijndcl Oct 19, 2023
dde52ff
Fix formatting
stijndcl Oct 19, 2023
619106c
Improve time formatting
stijndcl Oct 19, 2023
80dd11b
Only fetch dependencies if caching failed
stijndcl Oct 19, 2023
2f763b9
Only fetch dependencies if caching failed
stijndcl Oct 19, 2023
1270065
Merge pull request #6 from stijndcl/fix/add-removed-models
stijndcl Oct 19, 2023
9731896
Bump db version to 2023-11-01
github-actions[bot] Nov 1, 2023
f9aaf20
Update cargo.toml
stijndcl Nov 8, 2023
7656c63
Add unipept email
stijndcl Nov 8, 2023
6f595d7
Re-name package
stijndcl Nov 8, 2023
3c4fd26
Apply more suggestions
stijndcl Nov 8, 2023
187a81a
Apply more suggestions
stijndcl Nov 8, 2023
612a025
Add bitvector
stijndcl Nov 8, 2023
2880077
Stash
stijndcl Nov 8, 2023
75f0620
Fix mains
stijndcl Nov 8, 2023
0e60c52
Apply last suggestions
stijndcl Nov 8, 2023
e1d7f34
Fix linting
stijndcl Nov 8, 2023
7019e8c
Formatting
stijndcl Nov 8, 2023
05118db
Merge pull request #7 from stijndcl/fix/felix-suggestions
stijndcl Nov 8, 2023
3394d20
Replace SmartStr with &str
stijndcl Nov 8, 2023
4069e12
Stash
stijndcl Nov 9, 2023
b45fa63
Apply more suggestions
stijndcl Nov 11, 2023
7aedd64
Fix formatting
stijndcl Nov 11, 2023
9d04211
Don't hardcode db type
stijndcl Nov 13, 2023
ba9907f
Formatting
stijndcl Nov 13, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
70 changes: 70 additions & 0 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
on:
pull_request:

permissions:
pull-requests: write
checks: write

env:
CACHE_KEY: CI

jobs:
dependencies:
name: Install dependencies
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
id: cache
with:
shared-key: ${{ env.CACHE_KEY }}
- run: cd scripts/helper_scripts/unipept-database-rs && cargo fetch
if: ${{ !steps.cache.outputs.cache-hit }}

build:
name: Build binaries
runs-on: ubuntu-latest
needs: [dependencies]
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
with:
shared-key: ${{ env.CACHE_KEY }}
- run: cd scripts/helper_scripts/unipept-database-rs && cargo build --release

format:
name: Check formatting
runs-on: ubuntu-latest
needs: [dependencies]
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt
- uses: Swatinem/rust-cache@v2
with:
shared-key: ${{ env.CACHE_KEY }}
- run: cd scripts/helper_scripts/unipept-database-rs && cargo fmt --all --check

lint:
name: Linting
runs-on: ubuntu-latest
needs: [dependencies]
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
components: clippy
- uses: Swatinem/rust-cache@v2
with:
shared-key: ${{ env.CACHE_KEY }}
- uses: giraffate/clippy-action@v1
with:
clippy_flags: -- -D warnings
reporter: 'github-pr-check'
fail_on_error: true
github_token: ${{ secrets.GITHUB_TOKEN }}
workdir: scripts/helper_scripts/unipept-database-rs

2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,5 @@ data/
out
scripts/helper_scripts/parser/output
scripts/helper_scripts/parser/src/META-INF
.idea/

22 changes: 22 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
MIT License

Copyright (c) 2023 Universiteit Gent

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

14 changes: 14 additions & 0 deletions scripts/helper_scripts/unipept-database-rs/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
### Rust template
# Generated by Cargo
# will have compiled files and executables
debug/
target/

# These are backup files generated by rustfmt
**/*.rs.bk

# MSVC Windows builds of rustc generate these, which store debugging information
*.pdb

# RustRover, CLion and IntelliJ
.idea/
Loading