diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 063724b..483d9e9 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -12,7 +12,7 @@ on: jobs: release: name: Release - runs-on: mambaorg/micromamba:1.5.8 + runs-on: ubuntu-latest permissions: contents: write steps: @@ -20,17 +20,23 @@ jobs: uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4 with: fetch-depth: 0 + - uses: mamba-org/setup-micromamba@v1 + with: + micromamba-version: 1.5.8-0 + environment-file: base_env.yml + init-shell: >- + bash + cache-environment: true + post-cleanup: all - name: Setup Node.js uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4 with: node-version: lts/* - - name: Setup mamba + - name: Setup poetry run: | - micromamba install -y -n base -f base_env.yml && micromamba clean --all --yes - eval "$(micromamba shell hook --shell bash)" - micromamba activate base poetry config virtualenvs.create false - + poetry install + poetry build - name: Release env: GH_TOKEN: ${{ secrets.SEMANTIC_RELEASE_TOKEN }} diff --git a/experiment_runner/processing/configurator.py b/experiment_runner/processing/configurator.py index f16a04b..4976083 100644 --- a/experiment_runner/processing/configurator.py +++ b/experiment_runner/processing/configurator.py @@ -101,9 +101,7 @@ def load_config(self, config_path: Path = CONFIG_PATH): ): self._config = self.create_config() else: - print( - "Aborting! Configuration path was defined but no configuration found!" - ) + print("Aborting! Configuration path was defined but no configuration found!") sys.exit(-1) else: loaded_config: Any = OmegaConf.to_container(OmegaConf.load(config_path)) @@ -113,9 +111,7 @@ def load_config(self, config_path: Path = CONFIG_PATH): raise ValueError("Loaded config is not valid!") if self.config.use_mailer and not self.config.password: - self.config.password = Prompt.ask( - ":closed_lock_with_key: Password", password=True - ) + self.config.password = Prompt.ask(":closed_lock_with_key: Password", password=True) if not self.config.password: print("No Password provided. Exiting...") @@ -128,17 +124,13 @@ def create_config(self) -> ConfigurationFile: if self.config_path.exists() and not Confirm.ask( ":warning: The config does already exist. Recreate it? :warning:" ): - loaded_config: Any = OmegaConf.to_container( - OmegaConf.load(self.config_path) - ) + loaded_config: Any = OmegaConf.to_container(OmegaConf.load(self.config_path)) if isinstance(loaded_config, Dict): return ConfigurationFile(**loaded_config) raise ValueError("Loaded config is not valid!") self._config: ConfigurationFile = OmegaConf.structured(ConfigurationFile) - print( - "This config fully supports Omegaconf syntax. See: https://omegaconf.readthedocs.io/" - ) + print("This config fully supports Omegaconf syntax. See: https://omegaconf.readthedocs.io/") print("--------- Mailer Configuration ------------") if Confirm.ask("Do you want to configure an email-address for the mailer?"): @@ -162,9 +154,7 @@ def create_config(self) -> ConfigurationFile: if show_config: print(Syntax(OmegaConf.to_yaml(self.config).strip(), "yaml")) - should_save = Confirm.ask( - "Save config? Otherwise it will be used for this run only.", default=True - ) + should_save = Confirm.ask("Save config? Otherwise it will be used for this run only.", default=True) if should_save: self.save_config()