Skip to content

Commit

Permalink
fixed file read instructions that was OS-dependent
Browse files Browse the repository at this point in the history
added test workflow for multiple OSs and multiple python versions
python version dependency relaxed to v3.9
  • Loading branch information
pedropaulofb committed Sep 13, 2023
1 parent 6ad01cf commit a1fa50f
Show file tree
Hide file tree
Showing 5 changed files with 39 additions and 6 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/code_testing.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Code Testing

on: [ push ]

permissions:
contents: read

jobs:
build:

runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ ubuntu-latest, macos-latest, windows-latest ]
python-version: [ "3.9", "3.10", "3.11" ]

steps:
- 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 pip
pip install -r requirements.txt
- name: Testing with pytest
run: pytest ./json2graph/tests/test_main.py
2 changes: 1 addition & 1 deletion json2graph/modules/globals.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

# Guarantees that the file will be found as it searches using this file as basis
package_dir = os.path.dirname(os.path.dirname(__file__))
metadata_file = os.path.join(package_dir, "resources\metadata.yaml")
metadata_file = os.path.join(package_dir, "resources" + os.sep + "metadata.yaml")

# Loads metadata_file into a dictionary
try:
Expand Down
4 changes: 2 additions & 2 deletions json2graph/resources/metadata.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ tool:
authors:
- Pedro Paulo F. Barcelos <[email protected]>
dependencies:
python: ^3.11
python: ^3.9
pyyaml: ^6.0.1
rdflib: ^7.0.0
validators: ^0.22.0
Expand All @@ -34,4 +34,4 @@ tool:
repository: https://w3id.org/ontouml/json2graph
urls:
PyPi Project: https://pypi.org/project/ontouml-json2graph/
version: 1.2.0
version: 1.2.1
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "ontouml-json2graph"
version = "1.2.0"
version = "1.2.1"
description = "OntoUML JSON2Graph Decoder"
license = "Apache-2.0"
authors = ["Pedro Paulo F. Barcelos <[email protected]>"]
Expand All @@ -21,7 +21,7 @@ conformsToBase = "https://w3id.org/ontouml#"
conformsToVersion = "v1.1.0"

[tool.poetry.dependencies]
python = "^3.11"
python = "^3.9"
pyyaml = "^6.0.1"
rdflib = "^7.0.0"
validators = "^0.22.0"
Expand Down
4 changes: 3 additions & 1 deletion setup_metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,10 @@

from json2graph.modules.errors import report_error_io_read, report_error_io_write

# MUST BE EXECUTED FROM JSON2GRAPH FOLDER

metadata_file_read = ".." + os.sep + "pyproject.toml"
metadata_file_write = ".." + os.sep + "json2graph/resources/metadata.yaml"
metadata_file_write = ".." + os.sep + "json2graph" + os.sep + "resources" + os.sep + "metadata.yaml"

# Loads pyproject.toml file into a dictionary
try:
Expand Down

0 comments on commit a1fa50f

Please sign in to comment.