2
0
mirror of https://github.com/m-labs/artiq.git synced 2024-12-25 03:08:27 +08:00

artiq: move namespace artiq.* -> artiq.language.*

perl -i -pe 's/^from artiq import \*$/from artiq.language import */' your_experiments/*.py
This commit is contained in:
Robert Jördens 2016-01-25 14:48:58 -07:00
parent ea3bb27029
commit fbe4d96572
23 changed files with 26 additions and 34 deletions

View File

@ -1,13 +1,3 @@
from artiq import language
from artiq.language import *
from artiq.coredevice.dds import (PHASE_MODE_CONTINUOUS, PHASE_MODE_ABSOLUTE,
PHASE_MODE_TRACKING)
__all__ = []
__all__.extend(language.__all__)
__all__ += ["PHASE_MODE_CONTINUOUS", "PHASE_MODE_ABSOLUTE",
"PHASE_MODE_TRACKING"]
from ._version import get_versions
__version__ = get_versions()['version']
del get_versions

View File

@ -1,5 +1,3 @@
# Copyright (C) 2014, 2015 Robert Jordens <jordens@gmail.com>
from artiq.language import core, types, environment, units, scan
from artiq.language.core import *
from artiq.language.types import *
@ -7,6 +5,8 @@ from artiq.language.environment import *
from artiq.language.units import *
from artiq.language.scan import *
from artiq.coredevice.dds import (PHASE_MODE_CONTINUOUS, PHASE_MODE_ABSOLUTE,
PHASE_MODE_TRACKING)
__all__ = []
__all__.extend(core.__all__)
@ -14,3 +14,5 @@ __all__.extend(types.__all__)
__all__.extend(environment.__all__)
__all__.extend(units.__all__)
__all__.extend(scan.__all__)
__all__ += ["PHASE_MODE_CONTINUOUS", "PHASE_MODE_ABSOLUTE",
"PHASE_MODE_TRACKING"]

View File

@ -1,7 +1,7 @@
from operator import itemgetter
from fractions import Fraction
from artiq import *
from artiq.language import *
from artiq.sim import devices as sim_devices
from artiq.test.hardware_testbench import ExperimentCase

View File

@ -5,7 +5,7 @@ import sys
import os
from time import time, sleep
from artiq import *
from artiq.language import *
from artiq.master.scheduler import Scheduler

View File

@ -5,7 +5,7 @@ import sys
import os
from time import sleep
from artiq import *
from artiq.language import *
from artiq.master.worker import *

View File

@ -1,7 +1,7 @@
Core language reference
=======================
The most commonly used features from those modules can be imported with ``from artiq import *``.
The most commonly used features from those modules can be imported with ``from artiq.language import *``.
:mod:`artiq.language.core` module
---------------------------------

View File

@ -8,7 +8,7 @@ Connecting to the core device
As a very first step, we will turn on a LED on the core device. Create a file ``led.py`` containing the following: ::
from artiq import *
from artiq.language import *
class LED(EnvExperiment):
@ -93,7 +93,7 @@ The point of running code on the core device is the ability to meet demanding re
Create a new file ``rtio.py`` containing the following: ::
from artiq import *
from artiq.language import *
class Tutorial(EnvExperiment):

View File

@ -16,7 +16,7 @@ Then create a ``~/artiq-master/repository`` sub-folder to contain experiments. T
Create a very simple experiment in ``~/artiq-master/repository`` and save it as ``mgmt_tutorial.py``: ::
from artiq import *
from artiq.language import *
class MgmtTutorial(EnvExperiment):

View File

@ -1,6 +1,6 @@
import logging
from artiq import *
from artiq.language import *
class SubComponent1(HasEnvironment):

View File

@ -1,4 +1,4 @@
from artiq import *
from artiq.language import *
class PhotonHistogram(EnvExperiment):

View File

@ -1,4 +1,4 @@
from artiq import *
from artiq.language import *
class BlinkForever(EnvExperiment):

View File

@ -1,4 +1,4 @@
from artiq import *
from artiq.language import *
class DDSTest(EnvExperiment):

View File

@ -1,4 +1,4 @@
from artiq import *
from artiq.language import *
class Handover(EnvExperiment):

View File

@ -1,6 +1,6 @@
import sys
from artiq import *
from artiq.language import *
class Mandelbrot(EnvExperiment):

View File

@ -1,6 +1,6 @@
# Copyright (C) 2014, 2015 Robert Jordens <jordens@gmail.com>
from artiq import *
from artiq.language import *
class PulseNotReceivedError(Exception):

View File

@ -2,7 +2,7 @@
import numpy as np
from artiq import *
from artiq.language import *
from artiq.wavesynth.coefficients import SplineSource

View File

@ -5,7 +5,7 @@ import random
import numpy as np
from scipy.optimize import curve_fit
from artiq import *
from artiq.language import *
def model(x, F0):

View File

@ -1,7 +1,7 @@
from itertools import count
from time import sleep
from artiq import *
from artiq.language import *
class RunForever(EnvExperiment):

View File

@ -1,6 +1,6 @@
import time
from artiq import *
from artiq.language import *
class _PayloadNOP(EnvExperiment):

View File

@ -1,6 +1,6 @@
from operator import itemgetter
from artiq import *
from artiq.language import *
class DDSSetter(EnvExperiment):

View File

@ -1,4 +1,4 @@
from artiq import *
from artiq.language import *
class TerminateAll(EnvExperiment):

View File

@ -1,4 +1,4 @@
from artiq import *
from artiq.language import *
class AluminumSpectroscopy(EnvExperiment):

View File

@ -1,4 +1,4 @@
from artiq import *
from artiq.language import *
class SimpleSimulation(EnvExperiment):