Skip to content

Create docker image#138

Merged
GabrieleMeoni merged 19 commits intomainfrom
create_docker_image
Feb 21, 2023
Merged

Create docker image#138
GabrieleMeoni merged 19 commits intomainfrom
create_docker_image

Conversation

@GabrieleMeoni
Copy link
Collaborator

Description

Summary of changes

  • Created Dockerfile
  • Created a workflow to update docker image every time you push or merge a PR on main and pushes it to DockerHub
  • #PR

Copy link
Collaborator

@gomezzz gomezzz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some minor changes and one problem: tests fail for me with

FAILED paseos/tests/operations_monitor_test.py::test_monitor - PermissionError: [Errno 13] Permission denied: 'test.csv'
FAILED paseos/tests/thermal_model_test.py::test_thermal - PermissionError: [Errno 13] Permission denied: 'thermal_test.csv'
FAILED paseos/tests/visualization_test.py::test_animation - RuntimeError: x must be a sequence

Detailed logs below

Error in test_animation:

def test_animation():
        """Simple test to verify that the animation executes without errors."""
        sim, sat1, earth = get_default_instance()

        sat2 = ActorBuilder.get_actor_scaffold("sat2", SpacecraftActor, pk.epoch(0))
        ActorBuilder.set_orbit(sat2, [0, 10000000, 0], [0, 0, 8000.0], pk.epoch(0), earth)
        ActorBuilder.set_power_devices(sat2, 5000, 10000, 1)
        sim.add_known_actor(sat2)

        anim = SpaceAnimation(sim)

        dt = 100
        for t in range(10):
>           anim.animate(sim, dt)

paseos/tests/visualization_test.py:24:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ paseos/visualization/space_animation.py:413: in animate
    self._animate(sim, dt)
paseos/visualization/space_animation.py:385: in _animate
    self.update(sim, creating_animation=True)
paseos/visualization/space_animation.py:325: in update
    self._plot_actors()
paseos/visualization/space_animation.py:210: in _plot_actors
    obj.plot.point.set_data_3d(data[-1, :])
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <mpl_toolkits.mplot3d.art3d.Line3D object at 0x7f95f5eb6550>, args = array([1.56476773, 0.12534795, 0.        ]), name = 'x', xyz = 1.564767732458861

    def set_data_3d(self, *args):
        """
        Set the x, y and z data

        Parameters
        ----------
        x : array-like
            The x-data to be plotted.
        y : array-like
            The y-data to be plotted.
        z : array-like
            The z-data to be plotted.

        Notes
        -----
        Accepts x, y, z arguments or a single array-like (x, y, z)
        """
        if len(args) == 1:
            args = args[0]
        for name, xyz in zip('xyz', args):
            if not np.iterable(xyz):
>               raise RuntimeError(f'{name} must be a sequence')
E               RuntimeError: x must be a sequence

../conda/envs/paseos/lib/python3.11/site-packages/mpl_toolkits/mplot3d/art3d.py:246: RuntimeError

test_thermal

paseos/tests/thermal_model_test.py:59:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ paseos/paseos.py:77: in save_status_log_csv
    self._operations_monitor.save_to_csv(filename)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <paseos.utils.operations_monitor.OperationsMonitor object at 0x7f95f4dada50>, filename = 'thermal_test.csv'

    def save_to_csv(self, filename):
        """Write the created log file to a csv file.

        Args:
            filename (str): File to store the log in.
        """
        logger.trace("Writing status log file to " + filename)
>       with open(filename, "w", newline="") as f:
E       PermissionError: [Errno 13] Permission denied: 'thermal_test.csv'

paseos/utils/operations_monitor.py:98: PermissionError

test_monitor

>       sim.save_status_log_csv("test.csv")

paseos/tests/operations_monitor_test.py:59:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ paseos/paseos.py:77: in save_status_log_csv
    self._operations_monitor.save_to_csv(filename)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <paseos.utils.operations_monitor.OperationsMonitor object at 0x7f95f5ef4e10>, filename = 'test.csv'

    def save_to_csv(self, filename):
        """Write the created log file to a csv file.

        Args:
            filename (str): File to store the log in.
        """
        logger.trace("Writing status log file to " + filename)
>       with open(filename, "w", newline="") as f:
E       PermissionError: [Errno 13] Permission denied: 'test.csv'

paseos/utils/operations_monitor.py:98: PermissionError

@gomezzz
Copy link
Collaborator

gomezzz commented Feb 15, 2023

An, one more thing, we should add links to the containers to the README with short explanation, I think? (somewhere in installation, I guess?)

@gomezzz gomezzz mentioned this pull request Feb 15, 2023
Copy link
Collaborator

@gomezzz gomezzz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some comments still open

GabrieleMeoni and others added 3 commits February 17, 2023 10:03
Co-authored-by: Pablo Gómez <contact@pablo-gomez.net>
Co-authored-by: Pablo Gómez <contact@pablo-gomez.net>
Copy link
Collaborator

@gomezzz gomezzz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some minor string changes on Dockerhub, please change
image

I think we should hold of on merging until the CI passes?

@gomezzz
Copy link
Collaborator

gomezzz commented Feb 20, 2023

@GabrieleMeoni can you merge main to check CI passes now?

@GabrieleMeoni GabrieleMeoni merged commit 213d4d9 into main Feb 21, 2023
@gomezzz gomezzz deleted the create_docker_image branch February 21, 2023 10:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants