aind-metadata-service


Nameaind-metadata-service JSON
Version 0.14.15 PyPI version JSON
download
home_pageNone
SummaryREST service to retrive metadata from databases.
upload_time2024-09-07 22:46:17
maintainerNone
docs_urlNone
authorAllen Institute for Neural Dynamics
requires_python>=3.10
licenseMIT
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # aind-metadata-service

[![License](https://img.shields.io/badge/license-MIT-brightgreen)](LICENSE)
![Code Style](https://img.shields.io/badge/code%20style-black-black)

REST service to retrieve metadata from databases.

## Installation

### Server Installation

Can be pip installed using `pip install aind-metadata-service[server]`.

Installing `pyodbc`.
- You may need to install `unixodbc-dev`. You can follow this [https://learn.microsoft.com/en-us/sql/connect/odbc/linux-mac/installing-the-microsoft-odbc-driver-for-sql-server?view=sql-server-ver16](link) for instructions depending on your os.

- You may need to run `docker system prune` before building the docker image if you're getting erros running apt-get:
```
#10 23.69 Err:1 http://deb.debian.org/debian bullseye/main amd64 libodbc1 amd64 2.3.6-0.1+b1
#10 23.69   Could not connect to debian.map.fastlydns.net:80 (146.75.42.132). - connect (111: Connection refused) Unable to connect to deb.debian.org:http:

```

### Client Installation

Can be pip installed with `pip install aind-metadata-service[client]`

### For Development

In the root directory, run
```
pip install -e .[dev]
```

## Contributing

### Linters and testing

There are several libraries used to run linters, check documentation, and run tests.

- Please test your changes using the **coverage** library, which will run the tests and log a coverage report:

```
coverage run -m unittest discover && coverage report
```

- Use **interrogate** to check that modules, methods, etc. have been documented thoroughly:

```
interrogate .
```

- Use **flake8** to check that code is up to standards (no unused imports, etc.):
```
flake8 .
```

- Use **black** to automatically format the code into PEP standards:
```
black .
```

- Use **isort** to automatically sort import statements:
```
isort .
```

### Pull requests

For internal members, please create a branch. For external members, please fork the repo and open a pull request from the fork. We'll primarily use [Angular](https://github.com/angular/angular/blob/main/CONTRIBUTING.md#commit) style for commit messages. Roughly, they should follow the pattern:
```
<type>(<scope>): <short summary>
```

where scope (optional) describes the packages affected by the code changes and type (mandatory) is one of:

- **build**: Changes that affect the build system or external dependencies (example scopes: pyproject.toml, setup.py)
- **ci**: Changes to our CI configuration files and scripts (examples: .github/workflows/ci.yml)
- **docs**: Documentation only changes
- **feat**: A new feature
- **fix**: A bug fix
- **perf**: A code change that improves performance
- **refactor**: A code change that neither fixes a bug nor adds a feature
- **test**: Adding missing tests or correcting existing tests

### Documentation
To generate the rst files source files for documentation, run
```
sphinx-apidoc -o doc_template/source/ src 
```
Then to create the documentation html files, run
```
sphinx-build -b html doc_template/source/ doc_template/build/html
```
More info on sphinx installation can be found here: https://www.sphinx-doc.org/en/master/usage/installation.html

### Responses
There are 6 possible status code responses for aind-metadata-service:
- **200**: successfully retrieved valid data without any problems. 
- **406**: successfully retrieved some data, but failed to validate against pydantic models.
- **404**: found no data that matches query.
- **300**: queried the server, but more items were returned than expected.
- **503**: failed to connect to labtracks/sharepoint servers.
- **500**: successfully connected to labtracks/sharepoint, but some other server error occurred.
These status codes are defined in StatusCodes enum in response_handler.py

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "aind-metadata-service",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.10",
    "maintainer_email": null,
    "keywords": null,
    "author": "Allen Institute for Neural Dynamics",
    "author_email": null,
    "download_url": "https://files.pythonhosted.org/packages/a8/f6/86c7bd978cb52a39f42ac35a86db3de79c2b7c4cbaafb475e52db889fe82/aind_metadata_service-0.14.15.tar.gz",
    "platform": null,
    "description": "# aind-metadata-service\n\n[![License](https://img.shields.io/badge/license-MIT-brightgreen)](LICENSE)\n![Code Style](https://img.shields.io/badge/code%20style-black-black)\n\nREST service to retrieve metadata from databases.\n\n## Installation\n\n### Server Installation\n\nCan be pip installed using `pip install aind-metadata-service[server]`.\n\nInstalling `pyodbc`.\n- You may need to install `unixodbc-dev`. You can follow this [https://learn.microsoft.com/en-us/sql/connect/odbc/linux-mac/installing-the-microsoft-odbc-driver-for-sql-server?view=sql-server-ver16](link) for instructions depending on your os.\n\n- You may need to run `docker system prune` before building the docker image if you're getting erros running apt-get:\n```\n#10 23.69 Err:1 http://deb.debian.org/debian bullseye/main amd64 libodbc1 amd64 2.3.6-0.1+b1\n#10 23.69   Could not connect to debian.map.fastlydns.net:80 (146.75.42.132). - connect (111: Connection refused) Unable to connect to deb.debian.org:http:\n\n```\n\n### Client Installation\n\nCan be pip installed with `pip install aind-metadata-service[client]`\n\n### For Development\n\nIn the root directory, run\n```\npip install -e .[dev]\n```\n\n## Contributing\n\n### Linters and testing\n\nThere are several libraries used to run linters, check documentation, and run tests.\n\n- Please test your changes using the **coverage** library, which will run the tests and log a coverage report:\n\n```\ncoverage run -m unittest discover && coverage report\n```\n\n- Use **interrogate** to check that modules, methods, etc. have been documented thoroughly:\n\n```\ninterrogate .\n```\n\n- Use **flake8** to check that code is up to standards (no unused imports, etc.):\n```\nflake8 .\n```\n\n- Use **black** to automatically format the code into PEP standards:\n```\nblack .\n```\n\n- Use **isort** to automatically sort import statements:\n```\nisort .\n```\n\n### Pull requests\n\nFor internal members, please create a branch. For external members, please fork the repo and open a pull request from the fork. We'll primarily use [Angular](https://github.com/angular/angular/blob/main/CONTRIBUTING.md#commit) style for commit messages. Roughly, they should follow the pattern:\n```\n<type>(<scope>): <short summary>\n```\n\nwhere scope (optional) describes the packages affected by the code changes and type (mandatory) is one of:\n\n- **build**: Changes that affect the build system or external dependencies (example scopes: pyproject.toml, setup.py)\n- **ci**: Changes to our CI configuration files and scripts (examples: .github/workflows/ci.yml)\n- **docs**: Documentation only changes\n- **feat**: A new feature\n- **fix**: A bug fix\n- **perf**: A code change that improves performance\n- **refactor**: A code change that neither fixes a bug nor adds a feature\n- **test**: Adding missing tests or correcting existing tests\n\n### Documentation\nTo generate the rst files source files for documentation, run\n```\nsphinx-apidoc -o doc_template/source/ src \n```\nThen to create the documentation html files, run\n```\nsphinx-build -b html doc_template/source/ doc_template/build/html\n```\nMore info on sphinx installation can be found here: https://www.sphinx-doc.org/en/master/usage/installation.html\n\n### Responses\nThere are 6 possible status code responses for aind-metadata-service:\n- **200**: successfully retrieved valid data without any problems. \n- **406**: successfully retrieved some data, but failed to validate against pydantic models.\n- **404**: found no data that matches query.\n- **300**: queried the server, but more items were returned than expected.\n- **503**: failed to connect to labtracks/sharepoint servers.\n- **500**: successfully connected to labtracks/sharepoint, but some other server error occurred.\nThese status codes are defined in StatusCodes enum in response_handler.py\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "REST service to retrive metadata from databases.",
    "version": "0.14.15",
    "project_urls": null,
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "9d9a5417ddd5b871d1fb08cc3266bd6f6dd121c6f62b4e5e3f83c13a405ed371",
                "md5": "517c1bff822b26838f815b64302d9462",
                "sha256": "b1aa2633358f1e872dd72e842cf5f3811f4c49d2f2fa00707cf72ce6a88e4fc9"
            },
            "downloads": -1,
            "filename": "aind_metadata_service-0.14.15-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "517c1bff822b26838f815b64302d9462",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.10",
            "size": 117288,
            "upload_time": "2024-09-07T22:46:16",
            "upload_time_iso_8601": "2024-09-07T22:46:16.527689Z",
            "url": "https://files.pythonhosted.org/packages/9d/9a/5417ddd5b871d1fb08cc3266bd6f6dd121c6f62b4e5e3f83c13a405ed371/aind_metadata_service-0.14.15-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "a8f686c7bd978cb52a39f42ac35a86db3de79c2b7c4cbaafb475e52db889fe82",
                "md5": "45e8076b2892d8a05443acf88c5e86d7",
                "sha256": "5b305298208e62dd7c2efa2f94dd7f8fb4cc41a58cd7b522815bb8e1cbaca8e0"
            },
            "downloads": -1,
            "filename": "aind_metadata_service-0.14.15.tar.gz",
            "has_sig": false,
            "md5_digest": "45e8076b2892d8a05443acf88c5e86d7",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.10",
            "size": 171160,
            "upload_time": "2024-09-07T22:46:17",
            "upload_time_iso_8601": "2024-09-07T22:46:17.910902Z",
            "url": "https://files.pythonhosted.org/packages/a8/f6/86c7bd978cb52a39f42ac35a86db3de79c2b7c4cbaafb475e52db889fe82/aind_metadata_service-0.14.15.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-09-07 22:46:17",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "aind-metadata-service"
}
        
Elapsed time: 0.59309s