Skip to content

Web app NMDC team members use to credit ambassadors and champions via ORCID

Notifications You must be signed in to change notification settings

microbiomedata/nmdc-orcid-creditor

Repository files navigation

nmdc-orcid-creditor

NMDC ORCID Creditor is a web app NMDC team members can use to offer credits to people that contribute to the project; and which those people can use to claim those credits—applying them to their ORCID profiles.

Important

NMDC ORCID Creditor does not yet allow a person to claim a credit in a way that updates their ORCID profile. That functionality is still under development.

Development

Quick start

  1. Create and customize your .env file.
    cp .env.example .env
  2. Spin up the containerized development environment.
    docker compose up --detach
  3. Visit the development server at: http://127.0.0.1:8000

Common tasks

Outside the container

  • View the container's logs:
    docker compose logs -f app
  • Access the container's shell:
    docker compose exec app bash

Inside the container

You can run the following commands inside the container (i.e. at the container's shell).

Alternatively, if you prepend docker compose exec app to any of them, you will be able to run it from outside the container.

  • Run tests:
    poetry run pytest
    
    # From outside the container:
    # $ docker compose exec app poetry run pytest
  • Format Python code:
    poetry run black .
    
    # From outside the container:
    # $ docker compose exec app poetry run black .
  • Format and lint Jinja2 templates:
    poetry run djlint --reformat --lint .
    
    # From outside the container:
    # $ docker compose exec app poetry run djlint --reformat --lint .
  • Format JavaScript files (if you have Node.js and NPM installed):
    npx --yes prettier --write nmdc-orcid-creditor-proxy/*.js
    
    # From outside the container:
    # $ docker compose exec app npx --yes prettier --write nmdc-orcid-creditor-proxy/*.js

Repository structure

Here's where you can find certain things within the repository:

  • nmdc-orcid-creditor-proxy/: Google Apps Script
  • nmdc_orcid_creditor/: FastAPI app
  • nmdc_orcid_creditor/templates/: Jinja2 templates used by the FastAPI app
  • static/: Static files served by the FastAPI app

References

  • We copied static/favicon.png and some brand color codes from the nmdc-field-notes repository
  • We downloaded static/undraw_online_resume_re_ru7s.svg from unDraw

About

Web app NMDC team members use to credit ambassadors and champions via ORCID

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published