Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Integration of AirClim 2.1 contrail module #18

Merged
merged 14 commits into from
Nov 6, 2024
Merged

Integration of AirClim 2.1 contrail module #18

merged 14 commits into from
Nov 6, 2024

Conversation

liammegill
Copy link
Collaborator

The first version of oac.cont is equivalent to the contrail module of AirClim 2.1.

@liammegill liammegill added type: feature Brand new functionality, features, pages, workflows, endpoints etc. module: contrails Related to the contrail module labels Nov 5, 2024
@liammegill liammegill added this to the v2.9.0 milestone Nov 5, 2024
@liammegill liammegill self-assigned this Nov 5, 2024
@liammegill liammegill changed the title AirClim 2.1 contrail module Integration of AirClim 2.1 contrail module Nov 5, 2024
@liammegill
Copy link
Collaborator Author

liammegill commented Nov 6, 2024

I have been trying to figure out this relative folder structure so that the files within utils/ can be loaded in tests/ but still run independently. I came across this thread: https://stackoverflow.com/questions/16981921/relative-imports-in-python-3. I think I have solved the problem now by including the following in the header of any file that should also be able to run on its own:

SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
sys.path.append(os.path.dirname(SCRIPT_DIR))

Unfortunately, pylint is not too happy with this because you should ideally first import everything before defining variables (https://pylint.readthedocs.io/en/latest/user_guide/messages/convention/wrong-import-position.html). But this is the only way I have managed to get this to work... I will now try committing a new version to see whether this (finally) passes the checks.

@liammegill liammegill marked this pull request as ready for review November 6, 2024 10:29
Copy link
Collaborator

@stefan-voelk stefan-voelk left a comment

Choose a reason for hiding this comment

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

feature/cont looks good and GitHub Actions successfully passed through! Merging to dev can go ahead.

@liammegill liammegill merged commit 1861ec6 into dev Nov 6, 2024
1 check passed
@liammegill liammegill linked an issue Nov 11, 2024 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
module: contrails Related to the contrail module type: feature Brand new functionality, features, pages, workflows, endpoints etc.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Create contrail unit tests
2 participants