Skip to content

Commit cea1f7a

Browse files
authored
Isolating pulser-pasqal version and release process (#733)
* Isolating pulser-pasqal version and release process * Delete version test
1 parent a90dec0 commit cea1f7a

File tree

7 files changed

+11
-14
lines changed

7 files changed

+11
-14
lines changed

packages.txt

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,2 @@
11
pulser-core
2-
pulser-simulation
3-
pulser-pasqal
2+
pulser-simulation

pulser-pasqal/VERSION.txt

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
0.20.1

pulser-pasqal/pulser_pasqal/_version.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,7 @@
1313
# limitations under the License.
1414
from pathlib import PurePath
1515

16-
# Sets the version to the same as 'pulser'.
17-
version_file_path = PurePath(__file__).parent.parent.parent / "VERSION.txt"
16+
version_file_path = PurePath(__file__).parent.parent / "VERSION.txt"
1817

1918
with open(version_file_path, "r", encoding="utf-8") as f:
2019
__version__ = f.read().strip()

pulser-pasqal/requirements.txt

+1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
1+
pulser-core >= 0.20
12
pasqal-cloud ~= 0.12
23
backoff ~= 2.2

pulser-pasqal/setup.py

+1-4
Original file line numberDiff line numberDiff line change
@@ -25,17 +25,14 @@
2525
current_directory = Path(__file__).parent
2626

2727
# Reads the version from the VERSION.txt file
28-
with open(
29-
current_directory.parent / "VERSION.txt", "r", encoding="utf-8"
30-
) as f:
28+
with open(current_directory / "VERSION.txt", "r", encoding="utf-8") as f:
3129
__version__ = f.read().strip()
3230

3331
# Changes to the directory where setup.py is
3432
os.chdir(current_directory)
3533

3634
with open("requirements.txt", encoding="utf-8") as f:
3735
requirements = f.read().splitlines()
38-
requirements.append(f"pulser-core=={__version__}")
3936

4037
# Stashes the source code for the local version file
4138
local_version_fpath = Path(package_name) / "_version.py"

setup.py

+6-1
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,13 @@
2525
"`make dev-install` instead."
2626
)
2727

28+
# Pulser packages not pinned to __version__
29+
requirements = [
30+
"pulser-pasqal",
31+
]
32+
# Adding packages pinned to __version__
2833
with open("packages.txt", "r", encoding="utf-8") as f:
29-
requirements = [f"{pkg.strip()}=={__version__}" for pkg in f.readlines()]
34+
requirements += [f"{pkg.strip()}=={__version__}" for pkg in f.readlines()]
3035

3136
# Just a meta-package that requires all pulser packages
3237
setup(

tests/test_pasqal.py

-5
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424
from pasqal_cloud.device.configuration import EmuFreeConfig, EmuTNConfig
2525

2626
import pulser
27-
import pulser_pasqal
2827
from pulser.backend.config import EmulatorConfig
2928
from pulser.backend.remote import (
3029
BatchStatus,
@@ -44,10 +43,6 @@
4443
root = Path(__file__).parent.parent
4544

4645

47-
def test_version():
48-
assert pulser_pasqal.__version__ == pulser.__version__
49-
50-
5146
@dataclasses.dataclass
5247
class CloudFixture:
5348
pasqal_cloud: PasqalCloud

0 commit comments

Comments
 (0)