Skip to content

Commit

Permalink
Merge branch 'main' into autosuggestions
Browse files Browse the repository at this point in the history
  • Loading branch information
Collins-Webdev authored Oct 22, 2024
2 parents cdc2f52 + 98a9c5d commit e2e9546
Show file tree
Hide file tree
Showing 297 changed files with 5,900 additions and 3,295 deletions.
1 change: 1 addition & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ Thank you for your pull request! 🚀
<!-- Please replace the empty checkboxes [] below with checked ones [x] accordingly. -->

- [] This pull request is on a [separate branch](https://docs.github.com/en/get-started/quickstart/github-flow) and not the main branch
- [] I have tested my code with the `pytest` command as directed in the [testing section of the contributing guide](https://github.com/scribe-org/Scribe-Data/blob/main/CONTRIBUTING.md#testing)

---

Expand Down
23 changes: 22 additions & 1 deletion .github/workflows/check_project_structure.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,33 @@ on:

jobs:
structure-check:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest
python-version:
- "3.9"

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

steps:
- name: Checkout repository
uses: actions/checkout@v4

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

- name: Add project root to PYTHONPATH
run: echo "PYTHONPATH=$(pwd)/src" >> $GITHUB_ENV

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Run check_project_structure.py
working-directory: ./src/scribe_data/check
run: python check_project_structure.py
Expand Down
46 changes: 46 additions & 0 deletions .github/workflows/check_query_forms.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: Check Query Forms
on:
push:
branches: [main]
pull_request:
branches: [main]
types: [opened, reopened, synchronize]

jobs:
format_check:
strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest
python-version:
- "3.9"

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

name: Run Check Query Forms

steps:
- name: Checkout repository
uses: actions/checkout@v4

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

- name: Add project root to PYTHONPATH
run: echo "PYTHONPATH=$(pwd)/src" >> $GITHUB_ENV

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Run check_query_forms.py
working-directory: ./src/scribe_data/check
run: python check_query_forms.py

- name: Post-run status
if: failure()
run: echo "Project SPARQL query forms check failed. Please fix the reported errors."
47 changes: 24 additions & 23 deletions .github/workflows/check_query_identifiers.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@ on:
push:
branches: [main]
pull_request:
branches:
- main
branches: [main]
types: [opened, reopened, synchronize]

jobs:
Expand All @@ -22,24 +21,26 @@ jobs:
name: Run Check Query Identifiers

steps:
- name: Checkout
uses: actions/checkout@v3

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

# - name: Install dependencies
# run: |
# python -m pip install --upgrade uv
# uv venv
# uv pip install -r requirements.txt

# - name: Activate virtualenv
# run: |
# . .venv/bin/activate
# echo PATH=$PATH >> $GITHUB_ENV

# - name: Run Python script
# run: python src/scribe_data/check/check_query_identifiers.py
- name: Checkout repository
uses: actions/checkout@v4

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

- name: Add project root to PYTHONPATH
run: echo "PYTHONPATH=$(pwd)/src" >> $GITHUB_ENV

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Run check_query_identifiers.py
working-directory: ./src/scribe_data/check
run: python check_query_identifiers.py

- name: Post-run status
if: failure()
run: echo "Project SPARQL queries check failed. Please fix the reported errors."
11 changes: 11 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ If you have questions or would like to communicate with the team, please [join u
- [First steps as a contributor](#first-steps)
- [Learning the tech stack](#learning-the-tech)
- [Development environment](#dev-env)
- [Testing](#testing)
- [Issues and projects](#issues-projects)
- [Bug reports](#bug-reports)
- [Feature requests](#feature-requests)
Expand Down Expand Up @@ -171,6 +172,16 @@ pip install -e .
> [!NOTE]
> Feel free to contact the team in the [Data room on Matrix](https://matrix.to/#/#ScribeData:matrix.org) if you're having problems getting your environment setup!

<a id="testing"></a>

## Testing [`⇧`](#contents)

In addition to the [pre-commit](https://pre-commit.com/) hooks that are set up during the [development environment section](#dev-env), Scribe-Data also includes a testing suite that should be ran before all pull requests and subsequent commits. Please run the following in the project root:

```bash
pytest
```

<a id="issues-projects"></a>

## Issues and projects [`⇧`](#contents)
Expand Down
9 changes: 5 additions & 4 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@

# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
#
import sphinx_rtd_theme


sys.path.insert(0, os.path.abspath("../../src"))

Expand All @@ -36,7 +35,7 @@
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = [
"m2r2",
# "m2r2",
"sphinx.ext.autodoc",
"numpydoc",
"sphinx.ext.viewcode",
Expand Down Expand Up @@ -80,6 +79,7 @@
# source_suffix = ['.rst', '.md']
source_suffix = ".rst"


# The master toctree document.
master_doc = "index"

Expand All @@ -91,7 +91,8 @@

html_theme = "sphinx_rtd_theme"

html_theme_path = [sphinx_rtd_theme]
# html_theme_path = [sphinx_rtd_theme]
# html_theme_path = []

# Theme options are theme-specific and customize the look and feel of a theme
# further. For a list of options available for each theme, see the
Expand Down
Loading

0 comments on commit e2e9546

Please sign in to comment.