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

Initial dev for the Metadata Manager #42

Merged
merged 16 commits into from
Sep 19, 2023
Merged
Show file tree
Hide file tree
Changes from 10 commits
Commits
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
3 changes: 1 addition & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@ check:
@yarn lint
@yarn prettier
@pre-commit run --all-files

scan:
2
@trufflehog --debug --only-verified git file://./ --since-commit main --branch HEAD --fail

deep: scan
Expand Down
143 changes: 0 additions & 143 deletions lib/workload/stateless/metadata_manager/component.ts

This file was deleted.

10 changes: 10 additions & 0 deletions lib/workload/stateless/metadata_manager/src/.editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
root = true

[*]
end_of_line = lf
insert_final_newline = true

[*.{js,json,yml}]
charset = utf-8
indent_style = space
indent_size = 2
4 changes: 4 additions & 0 deletions lib/workload/stateless/metadata_manager/src/.gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
/.yarn/** linguist-vendored
/.yarn/releases/* binary
/.yarn/plugins/**/* binary
/.pnp.* binary linguist-generated
139 changes: 139 additions & 0 deletions lib/workload/stateless/metadata_manager/src/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,139 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
lerna-debug.log*
.pnpm-debug.log*

# Diagnostic reports (https://nodejs.org/api/report.html)
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json

# Runtime data
pids
*.pid
*.seed
*.pid.lock

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage
*.lcov

# nyc test coverage
.nyc_output

# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# Bower dependency directory (https://bower.io/)
bower_components

# node-waf configuration
.lock-wscript

# Compiled binary addons (https://nodejs.org/api/addons.html)
build/Release

# Dependency directories
node_modules/
jspm_packages/

# Snowpack dependency directory (https://snowpack.dev/)
web_modules/

# TypeScript cache
*.tsbuildinfo

# Optional npm cache directory
.npm

# Optional eslint cache
.eslintcache

# Optional stylelint cache
.stylelintcache

# Microbundle cache
.rpt2_cache/
.rts2_cache_cjs/
.rts2_cache_es/
.rts2_cache_umd/

# Optional REPL history
.node_repl_history

# Output of 'npm pack'
*.tgz

# Yarn Integrity file
.yarn-integrity

# dotenv environment variable files
.env
.env.development.local
.env.test.local
.env.production.local
.env.local

# parcel-bundler cache (https://parceljs.org/)
.cache
.parcel-cache

# Next.js build output
.next
out

# Nuxt.js build / generate output
.nuxt
dist

# Gatsby files
.cache/
# Comment in the public line in if your project uses Gatsby and not Next.js
# https://nextjs.org/blog/next-9-1#public-directory-support
# public

# vuepress build output
.vuepress/dist

# vuepress v2.x temp and cache directory
.temp
.cache

# Docusaurus cache and generated files
.docusaurus

# Serverless directories
.serverless/

# FuseBox cache
.fusebox/

# DynamoDB Local files
.dynamodb/

# TernJS port file
.tern-port

# Stores VSCode versions used for testing VSCode extensions
.vscode-test

# yarn v2
.yarn/cache/*
.yarn/unplugged
.yarn/build-state.yml
.yarn/install-state.gz
.pnp.*

# Swap the comments on the following lines if you don't wish to use zero-installs
# Documentation here: https://yarnpkg.com/features/zero-installs
!.yarn/cache
#.pnp.*

dbschema/edgeql-js
dbschema/queries.*
dbschema/interfaces.ts
52 changes: 36 additions & 16 deletions lib/workload/stateless/metadata_manager/src/README.md
Original file line number Diff line number Diff line change
@@ -1,26 +1,46 @@
# Metadata manager

# Development
The `MetadataManager` is one of the microservice within the UMCCR OrcaBus that manages the metadata records used for the
BioInformatics pipelines. The service will be responsible to make records to stay up to date and able to sync records
from multiple sources.

### Install
Create a virtual environment and install the `requirements-dev.txt`
## Development

1. Make virtual environment

`python -mvenv .venv`
2. Activate the environment
### Git Checkout
As this microservice is part of a monorepo from the main OrcaBus project, the process Git Flow process
will follow on the root of this project.

`source .venv/bin/activate`
3. Install the dependency
### Development

`make install`
#### Setup

Change the terminal directory from the OrcaBus root to this directory:

### Testing
```
cd lib/workload/stateless/metadata_manager/src
```

Follow the readme file in the root of the directory to create a MYSQL local database.
Requirement for this project:
- nodejs
- edgedb (see <https://www.edgedb.com/install>)

Go this directory
`cd lib/workload/stateless/library_manager/src`
To install the dependency of this project
```
yarn
```

And use the makefile to start testing
`make test`
Setup the database
```
yarn init-db
yarn migrate-db
```

#### Build
```yarn edgetypes```


### Run
```yarn watch```

#### Testing
```yarn test```
12 changes: 0 additions & 12 deletions lib/workload/stateless/metadata_manager/src/api.py

This file was deleted.

Loading
Loading