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

Rename stuff in GitProject GitService #796

Merged
merged 8 commits into from
Oct 9, 2022

Conversation

MariusWirtz
Copy link
Collaborator

work in progress

@MariusWirtz
Copy link
Collaborator Author

@scrumthing @nicolasbisurgi
What helper functions do you think we need for the GitProject class?

When I last saw the TM1Project used in a real environment, I think we were explicitly including all attribute dimensions in the project file with !.
So possibly we would want to add a function like include_all_attribute_dimensions that queries all attribute dimensions from TM1 and adds a line for each one to the project file?

@nicolasbisurgi
Copy link
Collaborator

@MariusWirtz
thanks for starting the conversation! I think you are correct, most of what people would use are the exceptions section. I did create the following functions already:

  • Add/remove tasks
  • Add/remove pre/post push/pull tasks
  • Add/remove ignore items
    And I'm working on the add remove deployments. I think that the latter will allow developers to make use of the settings functions (as we know tm1s.cfg can usually vary per environment).
    I think the pre/post push/pull tasks is also a good addition as it will allow you to automate the pre-post deployment steps that you want to perform.
    Example:
  • TasksA: exports (slice) cube data into flat files
  • TaskB: saves data, backs up the entire instance
  • TaskC: imports flat files created by TaskA.
  • IgnoreSection: includes these files created by TaskA
  1. TaskA is added as a pre-push run.
  2. TaskB is added as a pre-pull run.
  3. TaskC is added as post-pull run.

If we include deployments too (as I think we should) it will allow to customize these executions per environment (as deploying in a DEV environment is not the same than in PROD one).

Thoughts?

@MariusWirtz MariusWirtz force-pushed the feature/git-project-changes-and-enhancements branch from bdb1948 to 2a82ba0 Compare October 2, 2022 15:16
@MariusWirtz
Copy link
Collaborator Author

MariusWirtz commented Oct 2, 2022

Hi @nicolasbisurgi,

let's bring our efforts together.

Please review and approve the changes in this PR.
Once approved I will merge this PR.

I think for your additions you can open a PR into this branch or into master if this branch has been approved and merged by then.

@MariusWirtz MariusWirtz marked this pull request as ready for review October 2, 2022 16:03
@MariusWirtz MariusWirtz force-pushed the feature/git-project-changes-and-enhancements branch from f644451 to a99564c Compare October 2, 2022 18:13
@MariusWirtz MariusWirtz force-pushed the feature/git-project-changes-and-enhancements branch from a99564c to 1b8a59b Compare October 2, 2022 18:24
Copy link
Collaborator

@nicolasbisurgi nicolasbisurgi left a comment

Choose a reason for hiding this comment

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

Great work! I have a couple of questions:

  1. Should we also include 'remove' helper functions?
  2. Do we have time to include Deployment as a subclass of tm1project? I think that would add a lot more usability and, since it is basically a subset of a tm1project, it can inherit all the methods as well.

TM1py/Objects/GitProject.py Outdated Show resolved Hide resolved
Introduce `TM1ProjectDeployment` class
@MariusWirtz
Copy link
Collaborator Author

Sorry for the confusion. After I wrote the comment I realized that it wouldn’t make sense for those to be in the project on there own, that’s why I removed them from the project in the files I shared with you.
We can include them as just strings in the Task class and leave it alone for now.

I understand. Thanks!

@MariusWirtz MariusWirtz merged commit 05f3e80 into master Oct 9, 2022
@MariusWirtz MariusWirtz deleted the feature/git-project-changes-and-enhancements branch April 9, 2023 18:15
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.

2 participants