Skip to content

Commit ab114d7

Browse files
committed
add test data for julia and its fixtures
1 parent c2d2175 commit ab114d7

2 files changed

Lines changed: 92 additions & 0 deletions

File tree

tests/conftest.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
from somesy.core.models import Person, SomesyInput
1010
from somesy.package_json.writer import PackageJSON
1111
from somesy.pyproject import Pyproject
12+
from somesy.julia import Julia
1213

1314

1415
class FileTypes(Enum):
@@ -17,6 +18,7 @@ class FileTypes(Enum):
1718
CITATION = "citation"
1819
SOMESY = "somesy"
1920
PACKAGE_JSON = "package_json"
21+
JULIA = "julia"
2022

2123

2224
@pytest.fixture(scope="session", autouse=True)
@@ -68,6 +70,8 @@ def _create_files(files: Set[Tuple[FileTypes, str]]):
6870
read_file_name = read_file_path / Path("somesy.toml")
6971
elif file_type == FileTypes.PACKAGE_JSON:
7072
read_file_name = read_file_path / Path("package.json")
73+
elif file_type == FileTypes.JULIA:
74+
read_file_name = read_file_path / Path("Project.toml")
7175

7276
with open(read_file_name, "r") as f:
7377
content = f.read()
@@ -113,6 +117,9 @@ def _load_files(files: Set[FileTypes]):
113117
elif file_type == FileTypes.PACKAGE_JSON:
114118
read_file_name = read_file_name / Path("package.json")
115119
file_instances[file_type] = PackageJSON(read_file_name)
120+
elif file_type == FileTypes.JULIA:
121+
read_file_name = read_file_name / Path("Project.toml")
122+
file_instances[file_type] = Julia(read_file_name)
116123

117124
return file_instances
118125

tests/data/Project.toml

Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
name = "test-package"
2+
version = "0.1.0"
3+
uuid = "c8e1f9c6-0b0f-11ec-9a03-0242ac130003"
4+
authors = ["John Doe <john.doe@example.com>"]
5+
6+
# other Project.toml fields are randomly copied from Flux.jl
7+
[deps]
8+
Adapt = "79e6a3ab-5dfb-504d-930d-738a2a938a0e"
9+
ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4"
10+
11+
[weakdeps]
12+
AMDGPU = "21141c5a-9bdb-4563-92ae-f87d6854732e"
13+
14+
[extensions]
15+
FluxAMDGPUExt = "AMDGPU"
16+
FluxCUDAExt = "CUDA"
17+
18+
[compat]
19+
AMDGPU = "0.7, 0.8"
20+
julia = "1.9"
21+
22+
[extras]
23+
AMDGPU = "21141c5a-9bdb-4563-92ae-f87d6854732e"
24+
25+
[targets]
26+
test = ["Test", "Documenter", "IterTools", "AMDGPU"]
27+
28+
# project metadata
29+
[tool.somesy.project]
30+
name = "testproject"
31+
version = "1.0.0"
32+
description = "This is a test project for demonstration purposes."
33+
keywords = ["test", "demo", "example"]
34+
license = "MIT"
35+
repository = "https://github.com/example/testproject"
36+
homepage = "https://example.com/testproject"
37+
38+
[[tool.somesy.project.people]]
39+
family-names = "Doe"
40+
given-names = "John"
41+
email = "john.doe@example.com"
42+
orcid = "https://orcid.org/0000-0000-0000-0000"
43+
44+
contribution = "The main developer, maintainer, and tester."
45+
contribution_begin = "2023-01-15"
46+
contribution_types = ["maintenance", "code", "test", "review", "doc"]
47+
48+
author = true
49+
maintainer = true
50+
publication_author = true
51+
52+
[[tool.somesy.project.people]]
53+
family-names = "Doe"
54+
given-names = "Jane"
55+
email = "jane.doe@example.com"
56+
orcid = "https://orcid.org/0000-0000-0000-0001"
57+
58+
contribution = "Initial concepts, tool development and enhancement, documentation."
59+
contribution_begin = "2023-02-20"
60+
contribution_types = ["ideas", "code", "test", "review", "doc"]
61+
62+
author = true
63+
64+
[[tool.somesy.project.people]]
65+
family-names = "Doe"
66+
given-names = "Michael"
67+
email = "michael.doe@example.com"
68+
orcid = "https://orcid.org/0000-0000-0000-0002"
69+
70+
contribution = "Valuable input concerning metadata standards and usability."
71+
contribution_begin = "2023-03-10"
72+
contribution_types = ["ideas"]
73+
publication_author = true
74+
75+
[tool.somesy.config]
76+
no_sync_cff = false
77+
cff_file = "CITATION.cff"
78+
no_sync_pyproject = false
79+
pyproject_file = "pyproject.toml"
80+
no_sync_codemeta = false
81+
codemeta_file = "codemeta.json"
82+
no_sync_package_json = true
83+
show_info = false
84+
verbose = false
85+
debug = false

0 commit comments

Comments
 (0)