-
Notifications
You must be signed in to change notification settings - Fork 32
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 #440 from c-martinez/flake8
Linting
- Loading branch information
Showing
23 changed files
with
1,873 additions
and
1,203 deletions.
There are no files selected for viewing
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,3 @@ | ||
[flake8] | ||
per-file-ignores = src/__init__.py:F401 | ||
|
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,23 @@ | ||
name: Lint | ||
|
||
on: | ||
push: | ||
paths: | ||
- 'src/*.py' | ||
- 'tests/*.py' | ||
jobs: | ||
linter: | ||
runs-on: ubuntu-latest | ||
name: Lint | ||
steps: | ||
- name: Check out source repository | ||
uses: actions/checkout@v3 | ||
- name: Set up Python environment | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: "3.11" | ||
- name: flake8 Lint | ||
uses: py-actions/flake8@v2 | ||
with: | ||
max-line-length: "127" | ||
path: "src" |
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 |
---|---|---|
|
@@ -10,54 +10,54 @@ | |
import os | ||
from setuptools import setup | ||
|
||
grlc_base = 'src' | ||
grlc_base_dir = os.path.join(grlc_base, '') | ||
grlc_base = "src" | ||
grlc_base_dir = os.path.join(grlc_base, "") | ||
grlc_data = [] | ||
for root,dirs,files in os.walk(grlc_base): | ||
for root, dirs, files in os.walk(grlc_base): | ||
if root != grlc_base: | ||
root_dir = root.replace(grlc_base_dir, '') | ||
data_files = os.path.join(root_dir, '*') | ||
root_dir = root.replace(grlc_base_dir, "") | ||
data_files = os.path.join(root_dir, "*") | ||
grlc_data.append(data_files) | ||
|
||
# To update the package version number, edit CITATION.cff | ||
with open('CITATION.cff', 'r') as cff: | ||
with open("CITATION.cff", "r") as cff: | ||
for line in cff: | ||
if 'version:' in line: | ||
version = line.replace('version:', '').strip().strip('"') | ||
if "version:" in line: | ||
version = line.replace("version:", "").strip().strip('"') | ||
|
||
with codecs.open('requirements.txt', mode='r') as f: | ||
with codecs.open("requirements.txt", mode="r") as f: | ||
install_requires = f.read().splitlines() | ||
|
||
with codecs.open('requirements-test.txt', mode='r') as f: | ||
with codecs.open("requirements-test.txt", mode="r") as f: | ||
tests_require = f.read().splitlines() | ||
|
||
with codecs.open('README.md', mode='r', encoding='utf-8') as f: | ||
with codecs.open("README.md", mode="r", encoding="utf-8") as f: | ||
long_description = f.read() | ||
|
||
setup( | ||
name="grlc", | ||
description='grlc, the git repository linked data API constructor', | ||
description="grlc, the git repository linked data API constructor", | ||
long_description=long_description, | ||
long_description_content_type='text/markdown', | ||
long_description_content_type="text/markdown", | ||
license="Copyright 2017 Albert Meroño", | ||
author='Albert Meroño', | ||
author_email='[email protected]', | ||
url='https://github.com/CLARIAH/grlc', | ||
author="Albert Meroño", | ||
author_email="[email protected]", | ||
url="https://github.com/CLARIAH/grlc", | ||
version=version, | ||
py_modules=['grlc'], | ||
packages=['grlc'], | ||
package_dir = {'grlc': grlc_base}, | ||
scripts=['bin/grlc-server'], | ||
py_modules=["grlc"], | ||
packages=["grlc"], | ||
package_dir={"grlc": grlc_base}, | ||
scripts=["bin/grlc-server"], | ||
install_requires=install_requires, | ||
setup_requires=[ | ||
# dependency for `python setup.py test` | ||
'pytest-runner', | ||
"pytest-runner", | ||
# dependencies for `python setup.py build_sphinx` | ||
# 'sphinx', | ||
# 'recommonmark' | ||
], | ||
tests_require=tests_require, | ||
package_data = { 'grlc': grlc_data }, | ||
package_data={"grlc": grlc_data}, | ||
include_package_data=True, | ||
data_files=[('citation/grlc', ['CITATION.cff'])], | ||
data_files=[("citation/grlc", ["CITATION.cff"])], | ||
) |
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
Oops, something went wrong.