Skip to content

Commit

Permalink
Merge pull request #605 from hed-standard/develop
Browse files Browse the repository at this point in the history
Extensive revisions and updating of remodeling tools
  • Loading branch information
VisLab authored Feb 11, 2023
2 parents 4a68a9c + 14b2db1 commit 36d0ed9
Show file tree
Hide file tree
Showing 1,125 changed files with 32,138 additions and 8,532 deletions.
1 change: 0 additions & 1 deletion .codeclimate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -88,4 +88,3 @@ exclude_patterns:
- "**/deprecated/"
- "**/versioneer.py"
- "**/_version.py"
- "**/cli/"
2 changes: 2 additions & 0 deletions .coveragerc
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
[run]
branch = True
source =
hed
omit =
*/__init__.py
*/venv/*
Expand Down
10 changes: 10 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
- package-ecosystem: "pip"
directory: "/"
schedule:
interval: "weekly"
79 changes: 69 additions & 10 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,24 +8,28 @@ on:

jobs:
build:

strategy:
matrix:
platform: [ubuntu-latest]
python-version: [3.7, 3.8, 3.9]
python-version: [3.7, 3.9]

runs-on: ${{ matrix.platform }}

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}

- uses: actions/cache@v3
with:
path: ${{ env.pythonLocation }}
key: ${{ env.pythonLocation }}-${{ hashFiles('setup.py') }}-${{ hashFiles('dev-requirements.txt') }}

- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install --upgrade --upgrade-strategy eager pip
pip install flake8
pip install coverage
pip install -r requirements.txt
Expand All @@ -40,12 +44,67 @@ jobs:
- name: Test with unittest
run: |
coverage run -m unittest
HED_GITHUB_TOKEN=${{ secrets.HED_GITHUB_TOKEN }} coverage run -m unittest
- name: Archive code coverage results
if: ${{matrix.python-version == '3.9'}}
uses: actions/upload-artifact@v3
with:
name: code-coverage-report
path: .coverage

check-secret:
runs-on: ubuntu-latest
outputs:
secrets-exist: ${{ steps.check-for-secrets.outputs.defined }}
steps:
- name: Check for Secret availability
id: check-for-secrets
# perform secret check & put boolean result as an output
shell: bash
run: |
if [ "${{ secrets.CC_TEST_REPORTER_ID }}" != '' ]; then
echo "defined=true" >> $GITHUB_OUTPUT;
else
echo "defined=false" >> $GITHUB_OUTPUT;
fi
coverage:
name: Publish coverage
needs: [build, check-secret]
runs-on: ubuntu-latest
if: needs.check-secret.outputs.secrets-exist == 'true'

steps:
- uses: actions/checkout@v3
- name: Set up Python 3.9
uses: actions/setup-python@v4
with:
python-version: 3.9

- uses: actions/cache@v3
with:
path: ${{ env.pythonLocation }}
key: ${{ env.pythonLocation }}-${{ hashFiles('setup.py') }}-${{ hashFiles('dev-requirements.txt') }}

- name: Install dependencies
run: |
python -m pip install --upgrade --upgrade-strategy eager pip
pip install flake8
pip install coverage
pip install -r requirements.txt
pip install -r docs/requirements.txt
- name: Download a single artifact
uses: actions/download-artifact@v3
with:
name: code-coverage-report

- name: publish-coverages
uses: paambaati/codeclimate-action@v2.7.5
with:
coverageCommand: coverage xml
debug: true
uses: paambaati/codeclimate-action@v3.2.0
env:
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}
with:
coverageCommand: coverage xml
debug: true

3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ var/
*.egg-info/
.installed.cfg
*.egg
tests/scratch

# Installer logs
pip-log.txt
Expand Down Expand Up @@ -120,4 +121,4 @@ Desktop.ini

# Project specific
schema_cache_test/
hed_cache/
hed_cache/
27 changes: 5 additions & 22 deletions docs/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,29 +1,12 @@
click>=8.1.3
coverage>=6.3.2
defusedxml>=0.7.1
et-xmlfile>=1.1.0
Flask>=2.1.2
Flask-WTF>=1.0.1
inflect>=5.5.2
itsdangerous>=2.1.2
jdcal>=1.4.1
Jinja2>=3.0.0
jupyter>=1.0.0
MarkupSafe>=2.1.1
numpy>=1.20.3
numpydoc>=1.3.1
inflect>=5.5.1
myst-parser>=0.18.1
openpyxl>=3.0.9
pandas>=1.3.5
portalocker>=2.4.0
python-dateutil>=2.8.2
pytz>=2022.1
Pygments>=2.12.0
semantic_version>=2.9.0
six>=1.16.0
Sphinx>=4,<5
SphinxExtensions>=0.2.0
Sphinx>=5.2.2
sphinx_rtd_theme>=1.0.0

# This is just needed for secure_filename and should probably be removed
Werkzeug>=2.1.2
WTForms>=3.0.1
xlrd>=2.0.1
myst-parser>=0.17.2
32 changes: 32 additions & 0 deletions docs/source/_templates/custom-class-template.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{{ fullname | escape | underline}}

.. currentmodule:: {{ module }}

.. autoclass:: {{ objname }}
:members:
:show-inheritance:
:inherited-members:

{% block methods %}
.. automethod:: __init__

{% if methods %}
.. rubric:: {{ _('Methods') }}

.. autosummary::
{% for item in methods %}
~{{ name }}.{{ item }}
{%- endfor %}
{% endif %}
{% endblock %}

{% block attributes %}
{% if attributes %}
.. rubric:: {{ _('Attributes') }}

.. autosummary::
{% for item in attributes %}
~{{ name }}.{{ item }}
{%- endfor %}
{% endif %}
{% endblock %}
66 changes: 66 additions & 0 deletions docs/source/_templates/custom-module-template.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
{{ fullname | escape | underline}}

.. automodule:: {{ fullname }}

{% block attributes %}
{% if attributes %}
.. rubric:: Module Attributes

.. autosummary::
:toctree:
{% for item in attributes %}
{{ item }}
{%- endfor %}
{% endif %}
{% endblock %}

{% block functions %}
{% if functions %}
.. rubric:: {{ _('Functions') }}

.. autosummary::
:toctree:
{% for item in functions %}
{{ item }}
{%- endfor %}
{% endif %}
{% endblock %}

{% block classes %}
{% if classes %}
.. rubric:: {{ _('Classes') }}

.. autosummary::
:toctree:
:template: custom-class-template.rst
{% for item in classes %}
{{ item }}
{%- endfor %}
{% endif %}
{% endblock %}

{% block exceptions %}
{% if exceptions %}
.. rubric:: {{ _('Exceptions') }}

.. autosummary::
:toctree:
{% for item in exceptions %}
{{ item }}
{%- endfor %}
{% endif %}
{% endblock %}

{% block modules %}
{% if modules %}
.. rubric:: Modules

.. autosummary::
:toctree:
:template: custom-module-template.rst
:recursive:
{% for item in modules %}
{{ item }}
{%- endfor %}
{% endif %}
{% endblock %}
4 changes: 2 additions & 2 deletions docs/source/_templates/layout.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
<span class="caption-text">HED resources:</span>
</p>
<ul>
<li class="toctree-li">
<a href="https://hed-examples.readthedocs.io/en/latest/HedDocumentationSummary.html">Documentation summary</a></li>
<li class="toctree-li"><a href="https://www.hed-resources.org/en/latest/">Main resource page</a></li>
<li class="toctree-li"><a href="https://www.hedtags.org">Project home page</a></li>
<li class="toctree-li"><a href="https://www.hedtags.org/display_hed.html">Schema viewer</a></li>
<li class="toctree-li"><a href="https://www.hedtags.org/display_hed_library.html">Library schema viewer</a></li>
<li class="toctree-li"><a href="https://hed-specification.readthedocs.io/en/latest/index.html">Specification</a></li>
Expand Down
Loading

0 comments on commit 36d0ed9

Please sign in to comment.