Skip to content

Conversation

@brenmous
Copy link
Contributor

@brenmous brenmous commented Nov 9, 2022

project_dir is set as the working directory if meta generation is turned off. Commands cwd to project_dir, so hooks will be run in whatever directory you're running the generate command in. The default post-hooks will then run recursively in that directory on any Python files it can find.

Set the directory to run commands in to package_dir if meta is none, so post-hooks only touch the generated code.

fixes #696

`project_dir` is set as the working directory if meta generation is
turned off. Commands cwd to `project_dir`, so hooks will be run in
whatever directory you're running the `generate` command in.
The default post-hooks will then run recursively in that directory
on any Python files it can find.

Set the directory to run commands in to `package_dir` if meta is none,
so post-hooks only touch the generated code.

fixes openapi-generators#696
@wallagib
Copy link
Contributor

wallagib commented Jan 4, 2023

The failed checks seem like they were just a formatting issue. I opened the trivial fix to @brenmous's base branch here: brenmous#1

I can help rebase this off main if this has drifted.

@brenmous
Copy link
Contributor Author

brenmous commented Jan 5, 2023

Sorry about the formatting, should've followed up on the CI failure. Thanks for fixing it.

@codecov
Copy link

codecov bot commented Jan 6, 2023

Codecov Report

Merging #697 (b6ca63a) into main (f95dbe4) will not change coverage.
The diff coverage is 100.00%.

@@            Coverage Diff            @@
##              main      #697   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           49        49           
  Lines         1969      1970    +1     
=========================================
+ Hits          1969      1970    +1     
Impacted Files Coverage Δ
openapi_python_client/__init__.py 100.00% <100.00%> (ø)

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

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.

meta=none will cause post-hooks to run in working directory

4 participants