Skip to content

Commit

Permalink
Merge branch 'master' into flairNLPgh-3488/save-column-corpus-to-files
Browse files Browse the repository at this point in the history
  • Loading branch information
alanakbik authored Dec 19, 2024
2 parents f4466f7 + 29feea4 commit d012514
Show file tree
Hide file tree
Showing 169 changed files with 5,180 additions and 1,716 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ jobs:
FLAIR_CACHE_ROOT: ./cache/flair
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.8
- name: Set up Python 3.9
id: setup-python
uses: actions/setup-python@v4
with:
python-version: 3.8
python-version: 3.9
- name: Install Torch cpu
run: pip install torch --index-url https://download.pytorch.org/whl/cpu
- name: Install Flair dependencies
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
name: Build the docs using Sphinx and push to gh-pages
runs-on: ubuntu-latest
env:
python-version: 3.8
python-version: 3.9
steps:
- name: Checkout code
uses: actions/checkout@v3
Expand Down
52 changes: 52 additions & 0 deletions .github/workflows/test-docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: 'Build doc page for artifact'
on:
push:
branches: "*"

jobs:
build_docs:
name: Build the docs using Sphinx and publish as artifact
runs-on: ubuntu-latest
env:
python-version: 3.9
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: setup python ${{ env.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ env.python-version }}
- name: Install Torch cpu
run: pip install torch --index-url https://download.pytorch.org/whl/cpu
- name: Install Flair dependencies
run: pip install -e .
- name: Install unittest dependencies
run: pip install -r requirements-dev.txt
- name: Install doc dependencies
run: pip install -r docs/requirements.txt
- name: Fetch git tags
run: git fetch --tags origin
- name: Change config to current branch
env:
BRANCH_NAME: ${{ github.ref_name }}
run: |
sed -i 's/^smv_branch_whitelist = r"^master$"/smv_branch_whitelist = r"^${{ env.BRANCH_NAME }}$"/' docs/conf.py
sed -i 's/^smv_tag_whitelist = r"^v\d+\.\d+\.\d+$"/smv_tag_whitelist = "^$"/' docs/conf.py
cat docs/conf.py
- name: Build docs
run: |
sphinx-multiversion docs doc_build/
- name: Add redirect to stable doc
env:
BRANCH_NAME: ${{ github.ref_name }}
run: |
cp assets/redirect.html doc_build/index.html
cp assets/redirect.html doc_build/404.html
cp assets/README.md doc_build/README.md
sed -i "s/\[VERSION\]/${{ env.BRANCH_NAME }}/g" doc_build/index.html
sed -i "s/\[VERSION\]/${{ env.BRANCH_NAME }}/g" doc_build/404.html
- name: Archive code coverage results
uses: actions/upload-artifact@v4
with:
name: website
path: doc_build
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ the code should hopefully be easy.

### Setup

Flair requires python-3.8 or higher. To make sure your code also runs on the oldest supported
python version, it is recommended to use python-3.8.x for flair development.
Flair requires python-3.9 or higher. To make sure your code also runs on the oldest supported
python version, it is recommended to use python-3.9.x for flair development.

Create a python environment of your preference and run:
```bash
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ In your favorite virtual environment, simply do:
pip install flair
```

Flair requires Python 3.8+.
Flair requires Python 3.9+.

### Example 1: Tag Entities in Text

Expand Down
6 changes: 1 addition & 5 deletions SECURITY.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
We acknowledge that every line of code that we write may potentially contain security issues.
We are trying to deal with it responsibly and provide patches as quickly as possible.

We host our bug bounty program on HackerOne, it is currently private, therefore if you would like to report a vulnerability and get rewarded for it, please ask to join our program by filling this form:

https://corporate.zalando.com/en/services-and-contact#security-form

You can also send you report via this form if you do not want to join our bug bounty program and just want to report a vulnerability or security issue.
Please report any issues to [Alan Akbik](http://alanakbik.github.io/).
213 changes: 213 additions & 0 deletions docs/_static/css/api.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,213 @@
.sidebar-primary-item .docutils::before {
content: none;
}

.sidebar-primary-item .docutils .pre {
font-family: "Afacad", sans-serif;
font-size: 1rem;
text-overflow: ellipsis;
}

.sig {
color: var(--blue-white);
font-family: "Source Code Pro", monospace;
line-height: 2em;
word-break: break-word;
overflow-wrap: break-word;
white-space: normal;
}

.sig span.pre {
word-break: break-word;
overflow-wrap: break-word;
white-space: normal;
}

.sig .linkcode-link {
padding: 0;
display: inline-block;
width: 1rem;
height: 1rem;
transform: translateY(10%) scale(1.5);
}

.sig .linkcode-link .pre {
display: none;
}

.sig .linkcode-link::after {
content: "";
background-image: url("../../_static/octocat.svg");
background-size: cover;
display: inline-block;
width: 100%;
height: 100%;
}

.sig-name.descname {
color: var(--flair-orange);
}

.sig {
margin-top: 2rem;
margin-bottom: .5em;
padding-bottom: .5em;
padding-top: .5em;
}

.sig:target {
background: rgba(47, 46, 65, 0.15);
border-radius: .5rem;
}

:root .dark-mode .sig:target {
background: rgba(255, 255, 255, 0.15);
}

.class dd, .method dd, .function dd, .data dd {
margin-left: 0 !important;
padding-left: 3rem !important;
border-left: 2px var(--gray-white) solid;
}

.class dd dl.field-list, .method dd dl.field-list, .function dd dl.field-list, .data dd dl.field-list {
background-color: transparent;
border: 2px var(--flair-orange) solid;
border-radius: 1rem;
padding: 1rem 1.5rem;
}

.class dd dl.field-list ul, .method dd dl.field-list ul, .function dd dl.field-list ul, .data dd dl.field-list ul {
padding-left: 0 !important;
}

.class dd dl.field-list dt, .method dd dl.field-list dt, .function dd dl.field-list dt, .data dd dl.field-list dt {
background-color: transparent !important;
color: var(--blue-white);
font-weight: 600;
font-size: 1.5rem;
padding: 0 !important;
margin: 0 !important;
}

.class dd dl.field-list dd, .method dd dl.field-list dd, .function dd dl.field-list dd, .data dd dl.field-list dd {
margin: 0 !important;
padding: 0 !important;
border-left: none;
}

.class .n, .method .n, .function .n, .data .n {
color: #2AACB8;
}

.class .default_value, .method .default_value, .function .default_value, .data .default_value {
color: #8888C6;
}

div.deprecated {
box-shadow: none !important;
background: var(--error-red);
border: 2px var(--error-red) solid;
border-radius: 1rem;
padding: 0.5em 2.2em 0 2.2em;
box-sizing: border-box;
}

div.deprecated p span.versionmodified.deprecated::before {
color: white;
}

div.deprecated p::before {
content: none;
}

a.github::before {
content: "";
height: 1em;
width: 1em;
display: inline-block;
background-image: url("../../_static/octocat.svg");
background-size: contain;
background-position: center;
transform: translateY(25%);
}

blockquote {
font-family: "Source Code Pro", monospace;
border-radius: 1rem;
padding: 1.1em 1.5em;
background: var(--gray-dark-blue);
color: var(--blue-white);
}

blockquote::before {
content: none;
}

blockquote p {
margin: 0 !important;
}

.rubric {
font-size: 2rem;
margin: 1em 0 .5em 0 !important;
border-bottom: none !important;
}

table.autosummary {
margin-top: 1.5em;
}

table.autosummary .field-list {
margin-bottom: 0.5rem;
display: flex !important;
font-size: 1rem;
}

table.autosummary .field-list *:not(code) {
font-size: inherit !important;
}

table .field-odd, table .field-even {
color: var(--blue-white);
font-family: "Afacad", sans-serif;
}

table .field-odd p, table .field-even p {
margin: 0 !important;
}

table p:empty {
display: none;
}


@media screen and (max-width: 1200px) {
.class dd, .method dd, .function dd, .data dd {
padding-left: 1.5rem !important;
}
}

@media screen and (max-width: 900px) {
.sig, .sig * {
font-size: .8rem;
}

.class dd dl.field-list, .method dd dl.field-list, .function dd dl.field-list, .data dd dl.field-list {
padding: 1rem;
}
}

@media screen and (max-width: 400px) {
dl * {
font-size: .8rem !important;
}

dl code {
font-size: .6rem !important;
}

.class dd, .method dd, .function dd, .data dd {
padding-left: 1rem !important;
}
}
72 changes: 72 additions & 0 deletions docs/_static/css/footer.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
.bd-footer {
border: none;
background: var(--blue-orange);
height: var(--footer-height);
display: flex;
align-items: center;
}

.bd-footer *::selection {
background: var(--white-blue);
color: var(--flair-orange);
}

.bd-footer .bd-footer__inner {
padding: 0 10%;
width: 100%;
max-width: initial;
margin: 0;
box-sizing: border-box;
}

.bd-footer .bd-footer__inner .footer-item * {
color: white;
}

.bd-footer .bd-footer__inner a:hover {
color: var(--orange-blue);
}

.bd-footer .bd-footer__inner .footer-items__end {
display: flex;
flex-direction: row;
}

.bd-footer .bd-footer__inner .footer-items__end .footer-item:not(:last-of-type) {
margin-right: 3rem;
}

@media screen and (max-width: 959px) {
.bd-footer {
font-size: 0.8rem;
}

.bd-footer .bd-footer__inner .footer-items__end .footer-item:not(:last-of-type) {
margin-right: 2rem;
}
}

@media screen and (max-width: 700px) {
.bd-footer {
font-size: 1rem;
}

.bd-footer .bd-footer__inner .footer-items__start {
display: none;
}

.bd-footer .bd-footer__inner .footer-items__end {
width: 100%;
justify-content: space-between;
}

.bd-footer .bd-footer__inner .footer-items__end .footer-item:not(:last-of-type) {
margin-right: 1rem;
}
}

@media screen and (max-width: 435px) {
.bd-footer {
font-size: 0.8rem;
}
}
Loading

0 comments on commit d012514

Please sign in to comment.