Skip to content

Commit

Permalink
Rename package
Browse files Browse the repository at this point in the history
  • Loading branch information
ocelotl committed Jul 11, 2024
1 parent fb9ca87 commit 684631a
Show file tree
Hide file tree
Showing 4 changed files with 43 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ requires = ["hatchling"]
build-backend = "hatchling.build"

[project]
name = "generate_contrib_workflows"
name = "generate_workflows"
dynamic = ["version"]
description = "A package to generate contrib workflows"
description = "A package to generate workflows"
license = "Apache-2.0"
requires-python = ">=3.8"
authors = [
Expand All @@ -26,8 +26,5 @@ classifiers = [
]
dependencies = ["Jinja2"]

[project.scripts]
generate_contrib_workflows = "generate_contrib_workflows:generate_contrib_workflows"

[tool.hatch.version]
path = "src/generate_contrib_workflows/version.py"
path = "src/generate_workflows/version.py"
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,20 @@ def _get_python_version_alias(python_version):
return f"3.{python_version.replace('3', '')}"


def get_tox_envs(tox_ini_path: Path) -> list:

config_parser = ConfigParser()
config_parser.read(tox_ini_path)

envs = {}

for env in config_parser["tox"]["envlist"].split():
env = env.strip()

if env.startswith(";"):
continue


def get_test_jobs(tox_ini_path: Path) -> list:

config_parser = ConfigParser()
Expand Down
26 changes: 26 additions & 0 deletions .github/workflows/try_parser.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
from tox.config.source.ini import IniSource
from tox.config.types import EnvList
from pathlib import Path
from ipdb import set_trace
from tox.config.cli.parse import get_options
from tox.session.state import State

ini_source = IniSource(
Path("/home/tigre/github/ocelotl/opentelemetry-python-contrib/tox.ini")
)

state = State(get_options(), [])

conf = state.conf
set_trace()

tox_section = [section for section in ini_source.sections()][0]

tox_section_loader = ini_source.get_loader(tox_section, {})

# converted = tox_section_loader.load("envlist", EnvList, None, conf, raw, args)


raw = tox_section_loader.load_raw("envlist", conf, None)

set_trace()

0 comments on commit 684631a

Please sign in to comment.