Exemplo n.º 1
0
    def test_should_suite_project_setup(self):
        # given
        project_dir = Path(__file__).parent / 'example_project'

        # expected
        self.assertTrue(
            project_setup(
                **auto_configuration('example_project', project_dir)))
Exemplo n.º 2
0
    def test_should_produce_default_project_setup_using_autoconfiguration(self, build_command_mock, setup_mock, get_version_mock):
        # given
        get_version_mock.return_value = '0.1.0'
        build_command_mock.return_value = 1

        # when
        default_project_setup('example_project',  Path(__file__).parent / 'example_project')

        # then
        setup_mock.assert_called_with(**project_setup(**auto_configuration('example_project',  Path(__file__).parent / 'example_project')))
Exemplo n.º 3
0
    def test_should_produce_default_configuration_for_project_setup(self, get_version_mock):
        # given
        get_version_mock.return_value = '0.1.0'
        project_dir = Path(__file__).parent / 'example_project'

        # expected
        self.assertEqual(auto_configuration('example_project', project_dir), {
            'project_name': 'example_project',
            'docker_repository': 'test_repository',
            'root_package': project_dir / 'example_project',
            'project_dir': project_dir,
            'build_dir': project_dir / 'build',
            'test_package': project_dir / 'test',
            'dags_dir': project_dir / '.dags',
            'dist_dir': project_dir / 'dist',
            'image_dir': project_dir / 'image',
            'eggs_dir': project_dir / 'example_project.egg-info',
            'deployment_config_file': project_dir / 'deployment_config.py',
            'version': '0.1.0',
            'resources_dir': project_dir / 'resources',
            'project_requirements_file': project_dir / 'resources' / 'requirements.txt'
        })
Exemplo n.º 4
0
from setuptools import setup
from bigflow.build import project_setup, auto_configuration

PROJECT_NAME = 'examples'

if __name__ == '__main__':
    config = auto_configuration(PROJECT_NAME)
    config['version'] = '0.1.0'  # To make examples deterministic
    setup(**project_setup(**config))
Exemplo n.º 5
0
from setuptools import setup
from bigflow.build import project_setup, auto_configuration

PROJECT_NAME = 'examples'

if __name__ == '__main__':
    setup(**project_setup(**auto_configuration(PROJECT_NAME)))