def handle(self, *args, **options):
        sample = samples['rya_training_almanac']
        curve = create_database_curve_from_sample(sample)

        self.draw(Table(curve=curve, right='magnetic', url_pk=12345), 'table',         x=160, y=530)
        self.draw(Table(curve=curve, right='compass',  url_pk=12345), 'table_compass', x=250, y=530)
        self.draw(Rose( curve=curve, variation=-7),                   'rose',          x=269, y=520)
Exemple #2
0
    def test_multiple_rose_creation(self):
        name = 'rya_training_almanac'
        sample = samples[name]

        curve = create_database_curve_from_sample(sample)

        rose = Rose(variation=-1, variation_max=1, curve=curve)
        rose.draw()
        os.rename(rose.filename, "test_output/rose_%s_multiple.pdf" % name)
        self.assertTrue(True)
Exemple #3
0
    def test_rose_creation(self):
        for name, sample in samples.items():
            curve = create_database_curve_from_sample(sample)

            if not curve.can_calculate_curve:
                continue

            if not sample.get('save_file_for_tests'):
                continue

            rose = Rose(variation=0, curve=curve)
            rose.draw()
            os.rename(rose.filename, "test_output/rose_%s.pdf" % name)
            self.assertTrue(True)
Exemple #4
0
    def test_table_creation(self):
        for name, sample in samples.items():
            curve = create_database_curve_from_sample(sample)

            if not curve.can_calculate_curve:
                continue

            if not sample.get('save_file_for_tests'):
                continue

            for heading_type in ('magnetic','compass'):
                table = Table(curve=curve, right=heading_type, url_pk=12345)
                table.draw()
                os.rename(table.filename, "test_output/table_%s_%s.pdf" % (name, heading_type))
                self.assertTrue(True)