Skip to content

Commit

Permalink
Isolating pulser-pasqal version and release process (#733)
Browse files Browse the repository at this point in the history
* Isolating pulser-pasqal version and release process

* Delete version test
  • Loading branch information
HGSilveri authored Sep 24, 2024
1 parent a90dec0 commit cea1f7a
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 14 deletions.
3 changes: 1 addition & 2 deletions packages.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
pulser-core
pulser-simulation
pulser-pasqal
pulser-simulation
1 change: 1 addition & 0 deletions pulser-pasqal/VERSION.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
0.20.1
3 changes: 1 addition & 2 deletions pulser-pasqal/pulser_pasqal/_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,7 @@
# limitations under the License.
from pathlib import PurePath

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

with open(version_file_path, "r", encoding="utf-8") as f:
__version__ = f.read().strip()
1 change: 1 addition & 0 deletions pulser-pasqal/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
pulser-core >= 0.20
pasqal-cloud ~= 0.12
backoff ~= 2.2
5 changes: 1 addition & 4 deletions pulser-pasqal/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,17 +25,14 @@
current_directory = Path(__file__).parent

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

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

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

# Stashes the source code for the local version file
local_version_fpath = Path(package_name) / "_version.py"
Expand Down
7 changes: 6 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,13 @@
"`make dev-install` instead."
)

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

# Just a meta-package that requires all pulser packages
setup(
Expand Down
5 changes: 0 additions & 5 deletions tests/test_pasqal.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
from pasqal_cloud.device.configuration import EmuFreeConfig, EmuTNConfig

import pulser
import pulser_pasqal
from pulser.backend.config import EmulatorConfig
from pulser.backend.remote import (
BatchStatus,
Expand All @@ -44,10 +43,6 @@
root = Path(__file__).parent.parent


def test_version():
assert pulser_pasqal.__version__ == pulser.__version__


@dataclasses.dataclass
class CloudFixture:
pasqal_cloud: PasqalCloud
Expand Down

0 comments on commit cea1f7a

Please sign in to comment.