Skip to content

Commit

Permalink
Merge pull request #12 from DevOps-MBSE/correct-pinned-dependencies
Browse files Browse the repository at this point in the history
Correct pinned dependencies
  • Loading branch information
lizzcondrey authored May 1, 2024
2 parents c769765 + 2924b27 commit f137174
Show file tree
Hide file tree
Showing 12 changed files with 147 additions and 786 deletions.
5 changes: 1 addition & 4 deletions .github/workflows/python-build-and-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,7 @@ jobs:
with:
python-version: 3.9.13
- name: Install the aac-spec Package
run: pip install -e .

- name: Install requirements
run: pip install -r requirements.txt
run: pip install -e .[all]

- name: Lint with flake8
run: flake8 .
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/python-cross-platform-support.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
python-version: 3.9.13

- name: Install the AaC Specifications Package
run: python -m pip install -e .
run: python -m pip install -e .[all]

- name: Create Dependencies Package
id: os_id
Expand Down
7 changes: 2 additions & 5 deletions .github/workflows/python-test-python-version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,8 @@ jobs:
python-version: ${{ matrix.py_version }}

- name: Install the AaC Specification Package
run: pip install -e .

- name: Install requirements
run: pip install -r requirements.txt

run: pip install -e .[all]

- name: Run Tox Tests
run: tox -e $(echo py${{ matrix.py_version }} | awk -F "." '{print $1$2;}')

Expand Down
42 changes: 42 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,46 @@
[![Main branch aac-spec Workflow](https://github.com/DevOps-MBSE/aac-spec/actions/workflows/main-branch.yml/badge.svg)](https://github.com/DevOps-MBSE/aac-spec/actions/workflows/main-branch.yml)
[![Gitpod Ready-to-Code](https://img.shields.io/badge/Gitpod-Ready--to--Code-blue?logo=gitpod)](https://gitpod.io/from-referrer/)

# aac-spec

Specification and requirement tracing plugins for Architecture-as-Code

## PYTHON VERSION COMPATIBILITY

Currently, Python version 3.9.13 is required to avoid certain dependency version issues.

## pyproject.toml vs setup.py

Previously, this project was built with dependency information kept in a setup.py script.
However, the preferred method is to use pyproject.toml to set the project-level options.
Required modules are kept in the dependency sections of the pyproject.toml, and then the
pip-compile command is used to add hashes to the requirements.txt file for enhanced security
(see additional instructions below).

To coincide with these changes, some changes to tox.ini and the addition of a MANIFEST.ini file were also necessary.

These lines were added to tox.ini:
isolated_build = True
skipsdist = True

A MANIFEST file with these lines was added:
graft src
graft tests
include tox.ini
include src/puml/.aac

## TO BUILD FROM TERMINAL

cd python
pip install -e .

## TO TEST FROM TERMINAL

cd python
pip install -e .
python -m unittest

## Generate a requirements.txt file populated with hashes

pip install pip-tools
pip-compile --generate-hashes pyproject.toml
73 changes: 42 additions & 31 deletions python/README.md
Original file line number Diff line number Diff line change
@@ -1,32 +1,43 @@
# aac-spec

PYTHON VERSION COMPATIBILITY:
Currently, Python version 3.9.13 is required to avoid certain dependency version issues.

pyproject.toml vs setup.py
Previously, this project was built with dependency information kept in a setup.py script.
However, the preferred method is to use pyproject.toml to set the project-level options.
Required modules are kept in the requirements.in file, and then the pip-compile command is
used to add hashes to the requirements.txt file for enhanced security (see additional
instructions below).
To coincide with these changes, some changes to tox.ini and the addition of a MANIFEST.ini file were also necessary.
These lines were added to tox.ini:
isolated_build = True
skipsdist = True
A MANIFEST file with these lines was added:
graft src
graft tests
include tox.ini
include src/specifications/specifications.aac

TO BUILD FROM TERMINAL:
cd python
pip install -e .

TO TEST FROM TERMINAL:
cd python
pip install -e .
python -m unittest

To generate a requirements.txt file populated with hashes, use:
pip install pip-tools
pip-compile requirements.in --generate-hashes
Specification and requirement tracing plugins for Architecture-as-Code

## PYTHON VERSION COMPATIBILITY

Currently, Python version 3.9.13 is required to avoid certain dependency version issues.

## pyproject.toml vs setup.py

Previously, this project was built with dependency information kept in a setup.py script.
However, the preferred method is to use pyproject.toml to set the project-level options.
Required modules are kept in the dependency sections of the pyproject.toml, and then the
pip-compile command is used to add hashes to the requirements.txt file for enhanced security
(see additional instructions below).

To coincide with these changes, some changes to tox.ini and the addition of a MANIFEST.ini file were also necessary.

These lines were added to tox.ini:
isolated_build = True
skipsdist = True

A MANIFEST file with these lines was added:
graft src
graft tests
include tox.ini
include src/puml/.aac

## TO BUILD FROM TERMINAL

cd python
pip install -e .

## TO TEST FROM TERMINAL

cd python
pip install -e .
python -m unittest

## Generate a requirements.txt file populated with hashes

pip install pip-tools
pip-compile --generate-hashes pyproject.toml
63 changes: 51 additions & 12 deletions python/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,34 +1,73 @@
[build-system]
requires = ["setuptools>=61.0", "aac"]
requires = ["setuptools>=61.0"]
build-backend = "setuptools.build_meta"

[project]
name = "aac-spec"
version = "0.1.1"
version = "0.1.2"
authors = [
{ name="bunchw", email="asdfasdaf@email.com" },
{ name="lizzcondrey", email="asdfasdfd@mail.com" },
]
description = "Specification plugin for AaC"
requires-python = ">= 3.9.13"
dependencies = [
"aac>=0.4.3"
]
readme = "README.md"
license = {text = "MIT License"}
[tool.setuptools]
include-package-data = true
[tool.setuptools.packages.find]
where = ["src"]
[tool.setuptools.package-data]
mypkg = ["**/*.aac", "**/*.jinja2", "*.yaml"]
keywords = ["SysML", "Architecture-as-Code", "System Engineering"]
keywords = ["SysML", "Architecture-as-Code", "System Engineering", "MBSE"]
classifiers = [
"Programming Language :: Python :: 3",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Topic :: Scientific/Engineering"
]

dependencies = [
"aac >= 0.4.3",
]
[project.optional-dependencies]
doc = [
"sphinx >= 7.2.6",
"sphinx-autobuild ~= 2021.3.14",
"sphinx_contributors >= 0.2.7",
"sphinx-copybutton >= 0.5.2",
"sphinxcontrib-applehelp ~= 1.0.2",
"sphinxcontrib-devhelp ~= 1.0.2",
"sphinxcontrib-htmlhelp ~= 2.0.0",
"sphinxcontrib-jsmath ~= 1.0.1",
"sphinxcontrib-qthelp ~= 1.0.3",
"sphinxcontrib-serializinghtml ~= 1.1.9",
"docutils ~= 0.19",
"furo >= 2024.1.29",
"myst-parser >= 2.0.0",
"pytz ~= 2023.3"
]
test = [
"behave >= 1.2.6",
"build >= 1.1.1",
"coverage >= 7.4.3",
"flake8 >= 4.0.0",
"nose2 >= 0.10.0",
"pipdeptree >= 2.16.1",
"pyflakes >= 2.4",
"tox >= 3.24"
]
all = [
"aac >= 0.4.3",
"aac-spec[doc]",
"aac-spec[test]"
]

[project.entry-points."aac"]
spec-csv = "specifications"
[project.urls]
Homepage = "https://github.com/DevOps-MBSE/aac-spec"
Issues = "https://github.com/DevOps-MBSE/aac-spec/issues"

[tool.setuptools]
include-package-data = true
package-dir = {"" = "src"}
[tool.setuptools.packages.find]
where = ["src"]
exclude = ["tests"]
[tool.setuptools.package-data]
mypkg = ["**/*.aac", "**/*.jinja2", "*.yaml"]
14 changes: 0 additions & 14 deletions python/requirements.in

This file was deleted.

Loading

0 comments on commit f137174

Please sign in to comment.