Skip to content
Snippets Groups Projects
Commit 26219d22 authored by Yoann Schneider's avatar Yoann Schneider :tennis:
Browse files

Bootstrap

parent 00bdb35c
No related branches found
No related tags found
1 merge request!1Bootstrap
Pipeline #146836 passed
*.pyc
*.egg-info/
.tox/
.ruff_cache/
\ No newline at end of file
stages:
- test
- build
- deploy
- release
# GitLab provides a template to ensure pipelines run only for branches and tags, not for merge requests
# This prevents duplicate pipelines in merge requests.
# See https://docs.gitlab.com/ee/ci/troubleshooting.html#job-may-allow-multiple-pipelines-to-run-for-a-single-action
include:
- template: 'Workflows/Branch-Pipelines.gitlab-ci.yml'
variables:
VERSION: $CI_COMMIT_SHA
DEBIAN_FRONTEND: non-interactive
PIP_CACHE_DIR: "$CI_PROJECT_DIR/.cache/pip"
test:
image: python:slim
stage: test
cache:
paths:
- .cache/pip
before_script:
- pip install tox
except:
- schedules
script:
- tox -- --junitxml=test-report.xml --durations=50
lint:
image: python:slim
cache:
paths:
- .cache/pip
- .cache/pre-commit
variables:
PRE_COMMIT_HOME: "$CI_PROJECT_DIR/.cache/pre-commit"
before_script:
- pip install pre-commit
# Install git
- apt-get update -q -y && apt-get install -q -y --no-install-recommends git
except:
- schedules
script:
- pre-commit run -a
docker-build:
stage: build
image: docker:24.0.6
services:
- docker:dind
variables:
DOCKER_DRIVER: overlay2
DOCKER_HOST: tcp://docker:2375/
rules:
# Never run on scheduled pipelines
- if: '$CI_PIPELINE_SOURCE == "schedule"'
when: never
# Use commit tag when running on tagged commit
- if: $CI_COMMIT_TAG
variables:
VERSION: $CI_COMMIT_TAG
- when: on_success
script:
- ci/build.sh
bump-python-deps:
stage: release
image: registry.gitlab.teklia.com/infra/devops:latest
only:
- schedules
script:
- devops python-deps requirements.txt doc-requirements.txt
release-notes:
stage: release
image: registry.gitlab.teklia.com/infra/devops:latest
# Only run on tags
only:
- tags
script:
- devops release-notes
# Make sure docs still build correctly
.docs:
image: python:3.10
artifacts:
paths:
- public
before_script:
- pip install -e .[docs]
script:
- mkdocs build --strict --verbose
docs-build:
extends: .docs
stage: build
# Test job outside of tags to ensure the docs still can build before merging
# Does not use the `pages` name, therefore will be ignored by GitLab Pages
except:
- tags
- schedules
pages:
extends: .docs
stage: deploy
only:
- master
- tags
except:
- schedules
docs-deploy:
image: node:18
stage: deploy
dependencies:
- docs-build
before_script:
- npm install -g surge
except:
- master
- tags
- schedules
environment:
name: ${CI_COMMIT_REF_SLUG}
url: https://${CI_COMMIT_REF_SLUG}-metrics-bio.surge.sh
on_stop: docs-stop-surge
script:
- surge public ${CI_ENVIRONMENT_URL}
docs-stop-surge:
image: node:18
stage: deploy
when: manual
# Do not try to checkout the branch if it was deleted
variables:
GIT_STRATEGY: none
except:
- master
- tags
- schedules
environment:
name: ${CI_COMMIT_REF_SLUG}
url: https://${CI_COMMIT_REF_SLUG}-metrics-bio.surge.sh
action: stop
before_script:
- npm install -g surge
script:
- surge teardown ${CI_ENVIRONMENT_URL}
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
hooks:
- id: check-ast
- id: check-docstring-first
- id: check-executables-have-shebangs
- id: check-merge-conflict
- id: check-symlinks
- id: debug-statements
- id: trailing-whitespace
- id: check-yaml
args: [--allow-multiple-documents]
- id: check-toml
- id: mixed-line-ending
- id: name-tests-test
args: ['--django']
- id: check-json
- id: requirements-txt-fixer
- repo: https://github.com/astral-sh/ruff-pre-commit
# Ruff version.
rev: v0.1.7
hooks:
# Run the linter.
- id: ruff
args: [--fix, --exit-non-zero-on-fix]
# Run the formatter.
- id: ruff-format
- repo: https://github.com/codespell-project/codespell
rev: v2.2.6
hooks:
- id: codespell
args: ['--write-changes']
- repo: meta
hooks:
- id: check-useless-excludes
\ No newline at end of file
# Code of Conduct - BIO Parser
## Our Pledge
In the interest of fostering an open and welcoming environment, we as
contributors and maintainers pledge to make participation in our project and
our community a harassment-free experience for everyone, regardless of age, body
size, disability, ethnicity, sex characteristics, gender identity and expression,
level of experience, education, socio-economic status, nationality, personal
appearance, race, religion, or sexual identity and orientation.
## Our Standards
Examples of behavior that contributes to a positive environment for our
community include:
* Demonstrating empathy and kindness toward other people
* Being respectful of differing opinions, viewpoints, and experiences
* Giving and gracefully accepting constructive feedback
* Accepting responsibility and apologizing to those affected by our mistakes,
and learning from the experience
* Focusing on what is best not just for us as individuals, but for the
overall community
Examples of unacceptable behavior include:
* The use of sexualized language or imagery, and sexual attention or
advances
* Trolling, insulting or derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or email
address, without their explicit permission
* Other conduct which could reasonably be considered inappropriate in a
professional setting
## Our Responsibilities
Project maintainers are responsible for clarifying and enforcing our standards of
acceptable behavior and will take appropriate and fair corrective action in
response to any instances of unacceptable behavior.
Project maintainers have the right and responsibility to remove, edit, or reject
comments, commits, code, wiki edits, issues, and other contributions that are
not aligned to this Code of Conduct, or to ban
temporarily or permanently any contributor for other behaviors that they deem
inappropriate, threatening, offensive, or harmful.
## Scope
This Code of Conduct applies within all community spaces, and also applies when
an individual is officially representing the community in public spaces.
Examples of representing our community include using an official e-mail address,
posting via an official social media account, or acting as an appointed
representative at an online or offline event.
## Enforcement
Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported to the community leaders responsible for enforcement at <contact@teklia.com>.
All complaints will be reviewed and investigated promptly and fairly.
All community leaders are obligated to respect the privacy and security of the
reporter of any incident.
## Attribution
This Code of Conduct is adapted from the [Contributor Covenant](https://contributor-covenant.org/), version
[1.4](https://www.contributor-covenant.org/version/1/4/code-of-conduct/code_of_conduct.md) and
[2.0](https://www.contributor-covenant.org/version/2/0/code_of_conduct/code_of_conduct.md),
and was generated by [contributing-gen](https://github.com/bttger/contributing-gen).
<!-- omit in toc -->
# Contributing to BIO Parser
First off, thanks for taking the time to contribute! ❤️
All types of contributions are encouraged and valued. See the [Table of Contents](#table-of-contents) for different ways to help and details about how this project handles them. Please make sure to read the relevant section before making your contribution. It will make it a lot easier for us maintainers and smooth out the experience for all involved. The community looks forward to your contributions. 🎉
> And if you like the project, but just don't have time to contribute, that's fine. There are other easy ways to support the project and show your appreciation, which we would also be very happy about:
> - Star the project
> - Tweet about it
> - Refer this project in your project's readme
> - Mention the project at local meetups and tell your friends/colleagues
<!-- omit in toc -->
## Table of Contents
- [Code of Conduct](#code-of-conduct)
- [I Have a Question](#i-have-a-question)
- [I Want To Contribute](#i-want-to-contribute)
- [Reporting Bugs](#reporting-bugs)
- [Suggesting Enhancements](#suggesting-enhancements)
- [Attribution](#attribution)
## Code of Conduct
This project and everyone participating in it is governed by the
[BIO Parser Code of Conduct](https://gitlab.teklia.com/ner/metrics/bio-parser/blob/master/CODE_OF_CONDUCT.md).
By participating, you are expected to uphold this code. Please report unacceptable behavior
to <contact@teklia.com>.
## I Have a Question
> If you want to ask a question, we assume that you have read the available [Documentation](https://ner.pages.teklia.com/metrics/bio-parser).
Before you ask a question, it is best to search for existing [Issues](https://gitlab.teklia.com/ner/metrics/bio-parser/issues) that might help you. In case you have found a suitable issue and still need clarification, you can write your question in this issue. It is also advisable to search the internet for answers first.
If you then still feel the need to ask a question and need clarification, we recommend the following:
- Open an [Issue](https://gitlab.teklia.com/ner/metrics/bio-parser/issues/new).
- Provide as much context as you can about what you're running into.
- Provide project and platform versions (nodejs, npm, etc), depending on what seems relevant.
We will then take care of the issue as soon as possible.
## I Want To Contribute
> ### Legal Notice <!-- omit in toc -->
> When contributing to this project, you must agree that you have authored 100% of the content, that you have the necessary rights to the content and that the content you contribute may be provided under the project license.
### Reporting Bugs
<!-- omit in toc -->
#### Before Submitting a Bug Report
A good bug report shouldn't leave others needing to chase you up for more information. Therefore, we ask you to investigate carefully, collect information and describe the issue in detail in your report. Please complete the following steps in advance to help us fix any potential bug as fast as possible.
- Make sure that you are using the latest version.
- Determine if your bug is really a bug and not an error on your side e.g. using incompatible environment components/versions (Make sure that you have read the [documentation](https://ner.pages.teklia.com/metrics/bio-parser). If you are looking for support, you might want to check [this section](#i-have-a-question)).
- To see if other users have experienced (and potentially already solved) the same issue you are having, check if there is not already a bug report existing for your bug or error in the [bug tracker](https://gitlab.teklia.com/ner/metrics/bio-parser/issues?q=label%3Abug).
- Also make sure to search the internet (including Stack Overflow) to see if users outside of the GitHub community have discussed the issue.
- Collect information about the bug:
- Stack trace (Traceback)
- OS, Platform and Version (Windows, Linux, macOS, x86, ARM)
- Version of the interpreter, compiler, SDK, runtime environment, package manager, depending on what seems relevant.
- Possibly your input and the output
- Can you reliably reproduce the issue? And can you also reproduce it with older versions?
<!-- omit in toc -->
#### How Do I Submit a Good Bug Report?
> You must never report security related issues, vulnerabilities or bugs including sensitive information to the issue tracker, or elsewhere in public. Instead sensitive bugs must be sent by email to <contact@teklia.com>.
We use GitHub issues to track bugs and errors. If you run into an issue with the project:
- Open an [Issue](https://gitlab.teklia.com/ner/metrics/bio-parser/issues/new). (Since we can't be sure at this point whether it is a bug or not, we ask you not to talk about a bug yet and not to label the issue.)
- Explain the behavior you would expect and the actual behavior.
- Please provide as much context as possible and describe the *reproduction steps* that someone else can follow to recreate the issue on their own. This usually includes your code. For good bug reports you should isolate the problem and create a reduced test case.
- Provide the information you collected in the previous section.
Once it's filed:
- The project team will label the issue accordingly.
- A team member will try to reproduce the issue with your provided steps. If there are no reproduction steps or no obvious way to reproduce the issue, the team will ask you for those steps and mark the issue as `needs-repro`. Bugs with the `needs-repro` tag will not be addressed until they are reproduced.
- If the team is able to reproduce the issue, it will be marked `needs-fix`, as well as possibly other tags (such as `critical`), and the issue will be left to be [implemented by someone](#your-first-code-contribution).
### Suggesting Enhancements
This section guides you through submitting an enhancement suggestion for BIO Parser, **including completely new features and minor improvements to existing functionality**. Following these guidelines will help maintainers and the community to understand your suggestion and find related suggestions.
<!-- omit in toc -->
#### Before Submitting an Enhancement
- Make sure that you are using the latest version.
- Read the [documentation](https://ner.pages.teklia.com/metrics/bio-parser) carefully and find out if the functionality is already covered, maybe by an individual configuration.
- Perform a [search](https://gitlab.teklia.com/ner/metrics/bio-parser/issues) to see if the enhancement has already been suggested. If it has, add a comment to the existing issue instead of opening a new one.
- Find out whether your idea fits with the scope and aims of the project. It's up to you to make a strong case to convince the project's developers of the merits of this feature. Keep in mind that we want features that will be useful to the majority of our users and not just a small subset. If you're just targeting a minority of users, consider writing an add-on/plugin library.
## Attribution
This guide is based on the **contributing-gen**. [Make your own](https://github.com/bttger/contributing-gen)!
FROM python:3.10-slim
# Install package
WORKDIR /src
COPY requirements.txt doc-requirements.txt LICENSE setup.py pyproject.toml MANIFEST.in README.md /src/
COPY bio_parser /src/bio_parser
RUN pip install . --no-cache-dir
LICENSE 0 → 100644
MIT License
Copyright (c) 2023 TEKLIA
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.
include requirements.txt
include VERSION
Makefile 0 → 100644
.PHONY: release
release:
# Grep the version from pyproject.toml, squeeze multiple spaces, delete double and single quotes, get 3rd val.
# This command tolerates multiple whitespace sequences around the version number.
$(eval version:=$(shell grep -m 1 version pyproject.toml | tr -s ' ' | tr -d '"' | tr -d "'" | cut -d' ' -f3))
echo Releasing version $(version)
git commit pyproject.toml -m "Version $(version)"
git tag $(version)
git push origin master $(version)
# BIO Parser
## Documentation
The official documentation for this project is available at <https://ner.pages.teklia.com/metrics/bio-parser>.
## Getting started
## Get started
To make it easy for you to get started with GitLab, here's a list of recommended next steps.
Already a pro? Just edit this README.md and make it your own. Want to make it easy? [Use the template at the bottom](#editing-this-readme)!
## Add your files
- [ ] [Create](https://docs.gitlab.com/ee/user/project/repository/web_editor.html#create-a-file) or [upload](https://docs.gitlab.com/ee/user/project/repository/web_editor.html#upload-a-file) files
- [ ] [Add files using the command line](https://docs.gitlab.com/ee/gitlab-basics/add-file.html#add-a-file-using-the-command-line) or push an existing Git repository with the following command:
```
cd existing_repo
git remote add origin https://gitlab.teklia.com/ner/bio-parser.git
git branch -M master
git push -uf origin master
```
## Integrate with your tools
- [ ] [Set up project integrations](https://gitlab.teklia.com/ner/bio-parser/-/settings/integrations)
## Collaborate with your team
- [ ] [Invite team members and collaborators](https://docs.gitlab.com/ee/user/project/members/)
- [ ] [Create a new merge request](https://docs.gitlab.com/ee/user/project/merge_requests/creating_merge_requests.html)
- [ ] [Automatically close issues from merge requests](https://docs.gitlab.com/ee/user/project/issues/managing_issues.html#closing-issues-automatically)
- [ ] [Enable merge request approvals](https://docs.gitlab.com/ee/user/project/merge_requests/approvals/)
- [ ] [Set auto-merge](https://docs.gitlab.com/ee/user/project/merge_requests/merge_when_pipeline_succeeds.html)
## Test and Deploy
Use the built-in continuous integration in GitLab.
- [ ] [Get started with GitLab CI/CD](https://docs.gitlab.com/ee/ci/quick_start/index.html)
- [ ] [Analyze your code for known vulnerabilities with Static Application Security Testing (SAST)](https://docs.gitlab.com/ee/user/application_security/sast/)
- [ ] [Deploy to Kubernetes, Amazon EC2, or Amazon ECS using Auto Deploy](https://docs.gitlab.com/ee/topics/autodevops/requirements.html)
- [ ] [Use pull-based deployments for improved Kubernetes management](https://docs.gitlab.com/ee/user/clusters/agent/)
- [ ] [Set up protected environments](https://docs.gitlab.com/ee/ci/environments/protected_environments.html)
***
# Editing this README
When you're ready to make this README your own, just edit this file and use the handy template below (or feel free to structure it however you want - this is just a starting point!). Thanks to [makeareadme.com](https://www.makeareadme.com/) for this template.
## Suggestions for a good README
Every project is different, so consider which of these sections apply to yours. The sections used in the template are suggestions for most open source projects. Also keep in mind that while a README can be too long and detailed, too long is better than too short. If you think your README is too long, consider utilizing another form of documentation rather than cutting out information.
## Name
Choose a self-explaining name for your project.
## Description
Let people know what your project can do specifically. Provide context and add a link to any reference visitors might be unfamiliar with. A list of Features or a Background subsection can also be added here. If there are alternatives to your project, this is a good place to list differentiating factors.
## Badges
On some READMEs, you may see small images that convey metadata, such as whether or not all the tests are passing for the project. You can use Shields to add some to your README. Many services also have instructions for adding a badge.
## Visuals
Depending on what you are making, it can be a good idea to include screenshots or even a video (you'll frequently see GIFs rather than actual videos). Tools like ttygif can help, but check out Asciinema for a more sophisticated method.
## Installation
Within a particular ecosystem, there may be a common way of installing things, such as using Yarn, NuGet, or Homebrew. However, consider the possibility that whoever is reading your README is a novice and would like more guidance. Listing specific steps helps remove ambiguity and gets people to using your project as quickly as possible. If it only runs in a specific context like a particular programming language version or operating system or has dependencies that have to be installed manually, also add a Requirements subsection.
## Usage
Use examples liberally, and show the expected output if you can. It's helpful to have inline the smallest example of usage that you can demonstrate, while providing links to more sophisticated examples if they are too long to reasonably include in the README.
## Support
Tell people where they can go to for help. It can be any combination of an issue tracker, a chat room, an email address, etc.
## Roadmap
If you have ideas for releases in the future, it is a good idea to list them in the README.
## Contributing
State if you are open to contributions and what your requirements are for accepting them.
For people who want to make changes to your project, it's helpful to have some documentation on how to get started. Perhaps there is a script that they should run or some environment variables that they need to set. Make these steps explicit. These instructions could also be useful to your future self.
You can also document commands to lint the code or run tests. These steps help to ensure high code quality and reduce the likelihood that the changes inadvertently break something. Having instructions for running tests is especially helpful if it requires external setup, such as starting a Selenium server for testing in a browser.
## Authors and acknowledgment
Show your appreciation to those who have contributed to the project.
## License
For open source projects, say how it is licensed.
## Project status
If you have run out of energy or time for your project, put a note at the top of the README saying that development has slowed down or stopped completely. Someone may choose to fork your project or volunteer to step in as a maintainer or owner, allowing your project to keep going. You can also make an explicit request for maintainers.
To install this package or to get started with development for this project, visit the related [section](https://ner.pages.teklia.com/metrics/bio-parser/get_started) in the documentation.
import argparse
def main():
parser = argparse.ArgumentParser(
prog="bio-parser",
formatter_class=argparse.ArgumentDefaultsHelpFormatter,
)
# To add a sub-command, you can un-comment this snippet
# More information on https://docs.python.org/3/library/argparse.html#sub-commands
# commands = parser.add_subparsers(help="Explain your sub commands globally here")
# my_command = commands.add_parser("commandX", help="Do something")
# my_command.set_defaults(func=command_main)
# my_command.add_argument("element_id", type=uuid.UUID)
args = vars(parser.parse_args())
if "func" in args:
args.pop("func")(**args)
else:
parser.print_help()
#!/bin/sh -e
# Build the tasks Docker image.
# Requires CI_PROJECT_DIR and CI_REGISTRY_IMAGE to be set.
# VERSION defaults to latest.
# Will automatically login to a registry if CI_REGISTRY, CI_REGISTRY_USER and CI_REGISTRY_PASSWORD are set.
# Will only push an image if $CI_REGISTRY is set.
if [ -z "$VERSION" ]; then
VERSION=${CI_COMMIT_TAG:-latest}
fi
if [ -z "$VERSION" -o -z "$CI_PROJECT_DIR" -o -z "$CI_REGISTRY_IMAGE" ]; then
echo Missing environment variables
exit 1
fi
IMAGE_TAG="$CI_REGISTRY_IMAGE:$VERSION"
cd $CI_PROJECT_DIR
docker build -f Dockerfile . -t "$IMAGE_TAG"
# Publish the image on the main branch or on a tag
if [ "$CI_COMMIT_REF_NAME" = "master" -o -n "$CI_COMMIT_TAG" ]; then
if [ -n "$CI_REGISTRY" -a -n "$CI_REGISTRY_USER" -a -n "$CI_REGISTRY_PASSWORD" ]; then
echo $CI_REGISTRY_PASSWORD | docker login -u $CI_REGISTRY_USER --password-stdin $CI_REGISTRY
docker push $IMAGE_TAG
else
echo "Missing environment variables to log in to the container registry…"
fi
else
echo "The build was not published to the repository registry (only for master branch or tags)…"
fi
# Development
`bio-parser` uses different tools during its development. You can install needed dependencies using
```shell
pip install pre-commit tox
```
## Contributing
Found an issue that you want to work on? You can create a new branch from `master` to develop. The name should be somewhat related to the issue.
```shell
# Make sure you are starting from the current master branch
git checkout master
git pull
# Create a new branch (called <branch-name> in this case)
git checkout -b <branch-name>
```
Once you have created commits addressing the issue, you can push them to the remote branch. On the first push, you will be prompted to create a new merge request (MR). If the CI doesn't pass yet and you're still working on it, you can set the MR in **Draft** mode. Once it's ready, you can disable that mode and ask for a review from a **Maintainer**.
## Linter
Code syntax is analyzed before submitting the code.
To run the linter tools suite you may use [pre-commit](https://pre-commit.com).
```shell
pre-commit run -a
```
This checks for common coding issues and regressions. This will also be run on CI and the code **won't be merged** if this check doesn't pass.
## Tests
Tests are executed with [tox](https://tox.wiki) using [pytest](https://pytest.org).
```shell
tox
```
To recreate tox virtual environment (e.g. a dependencies update), you may run `tox -r`.
This checks for regressions on the code and validates the behavior of new features. This will also be run on CI and the code **won't be merged** if this check doesn't pass.
## Documentation
This documentation uses [Sphinx](http://www.sphinx-doc.org/) and was generated using [MkDocs](https://mkdocs.org/) and [mkdocstrings](https://mkdocstrings.github.io/).
### Setup
Add the `docs` extra when installing `bio-parser`:
```shell
# In a clone of the Git repository
pip install .[docs]
```
Build the documentation using `mkdocs serve -v`. You can then write in [Markdown](https://www.markdownguide.org/) in the relevant `docs/*.md` files, and see live output on <http://localhost:8000>.
# Get started
To use `bio-parser` in your own environment, you need to install manually.
### As a dependency
To install `bio-parser` as a dependency, you need to first add the following line to your `requirements.txt` file:
```shell
bio-parser @ git+ssh://git@gitlab.teklia.com/ner/metrics/bio-parser.git
```
Then you can install it via pip:
```shell
pip install -r requirements.txt
```
### Manually
To install `bio-parser` manually, you need to first clone via:
```shell
git clone git@gitlab.teklia.com:ner/metrics/bio-parser.git
```
Then you can install it via pip:
```shell
pip install .
```
---
To learn more about the newly installed `bio-parser` command, make sure to run:
```shell
bio-parser --help
```
---
Get started with:
- [Development](development.md)
# BIO Parser
[Get started with `bio-parser`](get_started/index.md) now!
# Code reference
\ No newline at end of file
site_name: BIO Parser
site_dir: public
theme:
name: material
font:
text: Roboto
code: Roboto Mono
features:
- navigation.top
- navigation.tracking
- navigation.indexes
- navigation.instant
- navigation.instant.progress
- content.code.copy
palette:
# Palette toggle for light mode
- media: "(prefers-color-scheme: light)"
scheme: default
toggle:
icon: material/brightness-7
name: Switch to dark mode
# Palette toggle for dark mode
- media: "(prefers-color-scheme: dark)"
scheme: slate
toggle:
icon: material/brightness-4
name: Switch to light mode
plugins:
- search
- autorefs
- literate-nav:
nav_file: SUMMARY.md
- mkdocstrings:
handlers:
python:
options:
show_root_toc_entry: false
show_object_full_path: false
show_root_heading: yes
show_source: true
docstring_style: google
merge_init_into_class: yes
show_category_heading: yes
show_signature_annotations: yes
separate_signature: yes
members_order: source
unwrap_annotated: yes
show_if_no_docstring: yes
filters:
- "!^_"
- "!^__"
nav:
- Home: index.md
- Get started:
- get_started/index.md
- Development: get_started/development.md
# defer to literate-nav
- Code Reference: reference/
copyright: Copyright &copy; Teklia
extra:
social:
- icon: fontawesome/brands/gitlab
name: Git repository for this project
link: https://gitlab.teklia.com/ner/metrics/bio-parser
markdown_extensions:
- pymdownx.superfences
- admonition
[build-system]
requires = ["setuptools >= 61.0"]
build-backend = "setuptools.build_meta"
[project]
name = "bio-parser"
dynamic = ["dependencies", "optional-dependencies"]
version = "0.1.0"
authors = [
{ name = "Oliver Tüselmann", email = "oliver.tueselmann@tu-dortmund.de" },
{ name = "David Villanova Aparisi", email = "davilap@inf.upv.es" },
{ name = "Yoann Schneider", email = "yschneider@teklia.com" },
{ name = "Solène Tarride", email = "starride@teklia.com" },
]
maintainers = [
{ name = "Yoann Schneider", email = "yschneider@teklia.com" },
{ name = "Solène Tarride", email = "starride@teklia.com" },
]
requires-python = ">=3.10"
readme = { file = "README.md", content-type = "text/markdown" }
license = { file = "LICENSE" }
keywords = ["NER", "python"]
classifiers = [
"Development Status :: 5 - Production/Stable",
"License :: OSI Approved :: MIT License",
# Specify the Python versions you support here.
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.10",
# Topics
"Topic :: Scientific/Engineering :: Artificial Intelligence",
"Topic :: Text Processing :: Linguistic",
]
[project.urls]
Homepage = "https://gitlab.teklia.com/ner/metrics/bio-parser"
Documentation = "https://ner.pages.teklia.com/metrics/bio-parser"
Repository = "https://gitlab.teklia.com/ner/metrics/bio-parser"
"Bug Tracker" = "https://gitlab.teklia.com/ner/metrics/bio-parser/issues"
[project.scripts]
bio-parser = "bio_parser.cli:main"
[tool.setuptools.dynamic]
dependencies = { file = ["requirements.txt"] }
optional-dependencies = { docs = { file = ["doc-requirements.txt"] }}
[tool.ruff]
exclude = [".git", "__pycache__"]
ignore = [
"E501",
# On top of the Google convention, disable `D417`, which requires
# documentation for every function parameter.
"D417",
]
select = [
# pycodestyle
"E",
"W",
# Pyflakes
"F",
# Flake8 Debugger
"T1",
# Isort
"I",
# Pathlib usage
"PTH",
# Pyupgrade
"UP",
# Pydocstyle
"D",
# Pandas-vet
"PD",
# Flake8-print
"T20",
# Flake8-comprehension
"C4",
# Flake8-builtins
"A",
# flake8-commas
"COM",
# flake8-import-conventions
"ICN",
# flake8-pytest-style
"PT",
# flake8-raise
"RSE",
# flake8-quotes
"Q",
# flake8-unused-arguments
"ARG",
]
[tool.ruff.lint.pydocstyle]
# Use Google-style docstrings.
convention = "google"
[tool.ruff.per-file-ignores]
# Ignore pydocstyles for setup.py
"setup.py" = ["D"]
"__init__.py" = ["D"]
"cli.py" = ["D"]
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment