Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

setup: clean and setup the directory for the new webapp #16

Merged
merged 10 commits into from
Jun 28, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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/format-typing-check.yml'
pull_request:
gcroci2 marked this conversation as resolved.
Show resolved Hide resolved
branches:
- main
paths:
- '**.py'
- '.github/workflows/format-typing-check.yml'
types:
gcroci2 marked this conversation as resolved.
Show resolved Hide resolved
- 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/build.yml
gcroci2 marked this conversation as resolved.
Show resolved Hide resolved
gcroci2 marked this conversation as resolved.
Show resolved Hide resolved
pull_request:
paths:
- app/**
- tests/**
- .github/workflows/build.yml
gcroci2 marked this conversation as resolved.
Show resolved Hide resolved
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.

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-2023 Netherlands eScience Center and Wageningen University & Research.
gcroci2 marked this conversation as resolved.
Show resolved Hide resolved

This product includes software developed at Netherlands eScience Center (https://www.esciencecenter.nl/)
Loading
Loading