-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #16 from NPLinker/15_setup_main_new_dashboard_gcroci2
setup: clean and setup the directory for the new webapp
- Loading branch information
Showing
49 changed files
with
297 additions
and
5,144 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,37 +1,48 @@ | ||
name: Check code style | ||
name: Check format and static typing | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
paths: | ||
- '**.py' | ||
- '.github/workflows/lint.yml' | ||
pull_request: | ||
branches: | ||
- main | ||
paths: | ||
- '**.py' | ||
- '.github/workflows/lint.yml' | ||
types: | ||
- opened | ||
- reopened | ||
- synchronize | ||
- ready_for_review | ||
|
||
jobs: | ||
|
||
lint: | ||
format-check: | ||
name: Check code format | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Set up Python 3.10 | ||
uses: actions/setup-python@v3 | ||
- uses: actions/checkout@v4 | ||
- name: Install ruff and mypy | ||
run: | | ||
pip install ruff mypy typing_extensions types-Deprecated types-beautifulsoup4 types-jsonschema pandas-stubs | ||
- name: Get all changed python files | ||
id: changed-python-files | ||
uses: tj-actions/changed-files@v44 | ||
with: | ||
python-version: '3.10' | ||
- name: Python info | ||
shell: bash -l {0} | ||
files: | | ||
**.py | ||
- name: Check format using ruff | ||
if: steps.changed-python-files.outputs.any_changed == 'true' | ||
env: | ||
ALL_CHANGED_FILES: ${{ steps.changed-python-files.outputs.all_changed_files }} | ||
run: | | ||
which python3 | ||
python3 --version | ||
- name: Upgrade pip and install dependencies | ||
ruff check ${ALL_CHANGED_FILES} | ||
- name: Check static typing using mypy | ||
if: steps.changed-python-files.outputs.any_changed == 'true' | ||
env: | ||
ALL_CHANGED_FILES: ${{ steps.changed-python-files.outputs.all_changed_files }} | ||
run: | | ||
python3 -m pip install --upgrade pip setuptools | ||
pip install "prospector[with_pyroma]" isort | ||
- name: Check style against standards using prospector | ||
run: prospector | ||
- name: Check import order | ||
run: isort --check-only . --diff | ||
mypy ${ALL_CHANGED_FILES} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
name: Test the dashboard | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
paths: | ||
- src/** | ||
- tests/** | ||
- setup.py | ||
- .github/workflows/test.yml | ||
pull_request: | ||
paths: | ||
- app/** | ||
- tests/** | ||
- .github/workflows/test.yml | ||
types: | ||
- opened | ||
- reopened | ||
- synchronize | ||
- ready_for_review | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up Python 3.10 | ||
uses: actions/setup-python@v3 | ||
with: | ||
python-version: '3.10' | ||
|
||
- name: Upgrade pip and install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
python -m venv venv | ||
source venv/bin/activate | ||
pip install -r requirements.txt | ||
- name: Run tests | ||
run: | | ||
source venv/bin/activate | ||
pip install pytest | ||
pytest tests |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,35 @@ | ||
# ide | ||
.idea | ||
.eclipse | ||
.vscode/ | ||
|
||
*.pyc | ||
.mypy_cache | ||
|
||
# Mac | ||
.DS_Store | ||
|
||
# Unit test / coverage reports | ||
htmlcov/ | ||
.tox/ | ||
.coverage | ||
.coverage.* | ||
nosetests.xml | ||
coverage.xml | ||
*.cover | ||
.hypothesis/ | ||
.pytest_cache/ | ||
pytest.ini | ||
|
||
# Jupyter Notebook | ||
.ipynb_checkpoints | ||
|
||
# virtual environments | ||
.env | ||
.venv | ||
env/ | ||
venv/ | ||
env3 | ||
venv3 | ||
ENV/ | ||
env.bak/ | ||
venv.bak/ |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
NPLinker webapp | ||
Copyright 2022-2024 Netherlands eScience Center and Wageningen University & Research. | ||
|
||
This product includes software developed at Netherlands eScience Center (https://www.esciencecenter.nl/) |
Oops, something went wrong.