https://github.com/apmoore1/pymusas-web-api
Web API for PyMUSAS built on the FastAPI framework.
Science Score: 13.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
○.zenodo.json file
-
○DOI references
-
○Academic publication links
-
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (10.7%) to scientific vocabulary
Repository
Web API for PyMUSAS built on the FastAPI framework.
Basic Info
- Host: GitHub
- Owner: apmoore1
- License: apache-2.0
- Language: Python
- Default Branch: main
- Size: 27.3 KB
Statistics
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
- Releases: 0
Metadata Files
README.md
PyMUSAS Web API
Web API for PyMUSAS built on the FastAPI framework.
Install
The requirements can be installed two different ways, but at the moment in both cases you need to download the repository locally:
- Python package install:
pip install . - Requirements file install:
pip install -r requirements.txt
Running the API
At the moment in both cases you need to download the repository locally, after which you can run the API in two different ways depending if you have installed it as a Python package or you have just installed the requirements:
If you have installed the package, e.g. pip install ., you can run the app like so (this can be ran outside of this repository):
bash
pymusas_web_api
Else if you have installed the requirements through the requirements file, e.g. pip install -r requirements.txt, you can the app like so (this cannot be ran outside of this repository):
bash
python pymusas_web_api
In both cases you can also use the following optional command line arguments:
``` Arguments to run the uvicorn server.
optional arguments: -h, --help show this help message and exit --host HOST Default: 127.0.0.1 --port PORT Default: 5000 --log-level LOG_LEVEL Default: info --reload Enable auto-reload (Default False) ```
Development
When developing on the project you will want to install the Python package locally in editable format with all the extra requirements, this can be done like so:
bash
pip install -e .[tests]
For a zsh shell, which is the default shell for the new Macs you will need to escape with \ the brackets:
bash
pip install -e .\[tests\]
Running linters and tests
This code base uses isort, flake8, and mypy to ensure that the format of the code is consistent and contain type hints. The flake8 settings can be found in ./setup.cfg and the isort and mypy settings within ./pyproject.toml. To run these linters:
bash
isort pymusas_web_api/ tests/
flake8
mypy
To run the tests with code coverage, the pytest and coverage settings can be found within ./pyproject.toml:
bash
coverage run # Runs the tests (uses pytest)
coverage report # Produces a command line report on the test coverage
If you would like a JSON or XML code coverage report run the respective commands to produce a coverage.json or coverage.xml file respectively:
bash
coverage json
coverage xml
Owner
- Name: Andrew Moore
- Login: apmoore1
- Kind: user
- Location: Lancaster
- Company: Lancaster University
- Website: https://apmoore1.github.io/
- Repositories: 55
- Profile: https://github.com/apmoore1
PhD student and researcher. Main interests: Target/Aspect based sentiment analysis, Semi-Supervised Learning.
GitHub Events
Total
Last Year
Issues and Pull Requests
Last synced: over 1 year ago
All Time
- Total issues: 0
- Total pull requests: 0
- Average time to close issues: N/A
- Average time to close pull requests: N/A
- Total issue authors: 0
- Total pull request authors: 0
- Average comments per issue: 0
- Average comments per pull request: 0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 0
- Pull requests: 0
- Average time to close issues: N/A
- Average time to close pull requests: N/A
- Issue authors: 0
- Pull request authors: 0
- Average comments per issue: 0
- Average comments per pull request: 0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0