Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename moved members + adapt packages setup for requirements project #512

Merged
merged 27 commits into from
Aug 30, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
cabecb9
force string for output
mickahell Jul 27, 2023
ee675cd
Revert "force string for output"
mickahell Jul 27, 2023
6c83731
Merge branch 'qiskit-community:main' into main
mickahell Jul 27, 2023
51c0f56
add assert for set_actions_output
mickahell Jul 29, 2023
97fb59f
Revert "add assert for set_actions_output"
mickahell Jul 29, 2023
4e47b0e
Merge branch 'qiskit-community:main' into main
mickahell Jul 31, 2023
924ee97
[CI] Dev and stable check only informational (#461)
mickahell Aug 1, 2023
fe4fd4e
Badges and stars update for 2023_08_02_13_46 (#474)
github-actions[bot] Aug 3, 2023
b47e815
Recompile members.json
invalid-email-address Aug 3, 2023
caaf6ea
Merge branch 'qiskit-community:main' into main
mickahell Aug 6, 2023
c618805
Merge branch 'qiskit-community:main' into main
mickahell Aug 15, 2023
8d306e4
Merge branch 'qiskit-community:main' into main
mickahell Aug 15, 2023
f8953be
Merge branch 'qiskit-community:main' into main
mickahell Aug 16, 2023
25b6154
Merge branch 'qiskit-community:main' into main
mickahell Aug 18, 2023
537f8b6
Merge branch 'qiskit-community:main' into main
mickahell Aug 21, 2023
cf38c92
Merge branch 'qiskit-community:main' into main
mickahell Aug 27, 2023
4628488
Update and rename qiskit-superstaq.toml to client-superstaq.toml
mickahell Aug 27, 2023
d310cc3
Update pytket-qiskit.toml
mickahell Aug 27, 2023
a6b9398
Update client-superstaq.toml
mickahell Aug 27, 2023
bc65fa3
Rename client-superstaq.toml to qiskit-superstaq.toml
mickahell Aug 27, 2023
88b4b04
Create requirements.txt
mickahell Aug 27, 2023
308eec7
Update configuration.py
mickahell Aug 27, 2023
da3f0ff
Update runner.py
mickahell Aug 27, 2023
da071de
typo
mickahell Aug 27, 2023
641eda6
extend tox allowlist_externals
mickahell Aug 27, 2023
ec385e4
extend tox allowlist_externals
mickahell Aug 27, 2023
52cf132
reverse tox + edit tests
mickahell Aug 27, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions ecosystem/models/configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,7 @@ class PythonRepositoryConfiguration(RepositoryConfiguration):
_lint_template: Template | None = None
_cov_template: Template | None = None
_setup_template: Template | None = None
_requirements_template: Template | None = None

def __post_init__(self):
env = Environment(
Expand All @@ -158,6 +159,7 @@ def __post_init__(self):
self._lint_template = env.get_template(".pylintrc")
self._cov_template = env.get_template(".coveragerc")
self._setup_template = env.get_template("setup.py")
self._requirements_template = env.get_template("requirements.txt")

@classmethod
def default(cls) -> "PythonRepositoryConfiguration":
Expand Down Expand Up @@ -205,3 +207,7 @@ def render_cov_file(self):
def render_setup_file(self):
"""Renders default setup.py file."""
return self._setup_template.render()

def render_requirements_file(self):
"""Renders default requirements.txt file."""
return self._requirements_template.render()
2 changes: 1 addition & 1 deletion ecosystem/resources/members/pytket-qiskit.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name = "pytket-qiskit"
url = "https://github.com/CQCL/pytket-extensions/tree/develop/modules/pytket-qiskit"
url = "https://github.com/CQCL/pytket-qiskit"
description = "an extension to Pytket (a python module for interfacing with CQC tket) that allows Pytket circuits to be run on IBM backends and simulators, as well as conversion to and from Qiskit representations."
licence = "Apache 2.0"
labels = [ "Converter",]
Expand Down
2 changes: 1 addition & 1 deletion ecosystem/resources/members/qiskit-superstaq.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name = "qiskit-superstaq"
url = "https://github.com/SupertechLabs/qiskit-superstaq"
url = "https://github.com/Infleqtion/client-superstaq/tree/main/qiskit-superstaq"
description = "This package is used to access SuperstaQ via a Web API through Qiskit. Qiskit programmers can take advantage of the applications, pulse level optimizations, and write-once-target-all features of SuperstaQ with this package."
licence = "Apache 2.0"
contact_info = ""
Expand Down
9 changes: 9 additions & 0 deletions ecosystem/runners/runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,15 @@ def configure_repo(
with open(f"{self.cloned_repo_directory}/setup.py", "w") as setup_file:
setup_file.write(repo_config.render_setup_file())

# check for requirements.txt file
if not os.path.exists(f"{self.cloned_repo_directory}/requirements.txt"):
self.logger.warning("No requirements files for repository %s", self.repo)
self.logger.warning("Creating default requirements.txt file.")
with open(
f"{self.cloned_repo_directory}/requirements.txt", "w"
) as requirements_file:
requirements_file.write(repo_config.render_requirements_file())

# check for tox/.pylintrc/.coveragerc file
for destination_file_name, renamed_file_name in zip(files, files_fault):
if os.path.exists(f"{self.cloned_repo_directory}/{destination_file_name}"):
Expand Down
1 change: 1 addition & 0 deletions ecosystem/templates/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Empty file for tpl
1 change: 0 additions & 1 deletion tests/resources/simple_python_repository/requirements.txt

This file was deleted.

2 changes: 1 addition & 1 deletion tests/resources/simple_python_repository/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@
description="demo-impl",
long_description="",
packages=setuptools.find_packages(),
install_requires=install_requires,
install_requires=["pytest==6.2.4"],
python_requires=">=3.6",
)