Skip to content

Commit

Permalink
Merge pull request #16 from NPLinker/15_setup_main_new_dashboard_gcroci2
Browse files Browse the repository at this point in the history
setup: clean and setup the directory for the new webapp
  • Loading branch information
gcroci2 authored Jun 28, 2024
2 parents fdc4cd9 + 222b882 commit e0798a0
Show file tree
Hide file tree
Showing 49 changed files with 297 additions and 5,144 deletions.
10 changes: 0 additions & 10 deletions .bumpversion.cfg

This file was deleted.

9 changes: 0 additions & 9 deletions .dockerignore

This file was deleted.

26 changes: 0 additions & 26 deletions .editorconfig

This file was deleted.

47 changes: 29 additions & 18 deletions .github/workflows/lint.yml
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}
73 changes: 0 additions & 73 deletions .github/workflows/publish_gh_release.yml

This file was deleted.

46 changes: 46 additions & 0 deletions .github/workflows/test.yml
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
35 changes: 34 additions & 1 deletion .gitignore
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/
30 changes: 0 additions & 30 deletions .prospector.yml

This file was deleted.

29 changes: 0 additions & 29 deletions .vscode/settings.json

This file was deleted.

3 changes: 1 addition & 2 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,5 +67,4 @@ members of the project's leadership.

## Attribution

This Code of Conduct is adapted from the [Contributor Covenant](https://www.contributor-covenant.org), version 1.4,
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
This Code of Conduct is adapted from the [Contributor Covenant](https://www.contributor-covenant.org), version 1.4, available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
26 changes: 0 additions & 26 deletions Dockerfile

This file was deleted.

4 changes: 4 additions & 0 deletions NOTICE
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/)
Loading

0 comments on commit e0798a0

Please sign in to comment.