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

Targets for summary packagers #73

Open
Mandera opened this issue Mar 23, 2023 · 9 comments
Open

Targets for summary packagers #73

Mandera opened this issue Mar 23, 2023 · 9 comments

Comments

@Mandera
Copy link
Collaborator

Mandera commented Mar 23, 2023

Readmes weren't being generated for summaries: https://github.com/ManderaGeneral/generalpackager/actions/runs/4501455101/jobs/7922085352#step:7:1238

@Mandera
Copy link
Collaborator Author

Mandera commented Mar 23, 2023

  • Change target default for Files to None
  • Add python target to most Files
  • Make definitions with target None and generate instructions generate for all targets

@Mandera
Copy link
Collaborator Author

Mandera commented Mar 23, 2023

  • Add a new target for summaries
  • Add metadata.json to both of them
    • PyCharm didn't recognize .github as a git repository, couldn't find a fix. Added metadata manually in github.com
  • Remove special treatment for them, make them go through ordered_packagers methods without changing end result
    • if_publish_bump
      • Is using compare_local_to_pypi, should change to github's and implement github.download(version)
      • self.compare_local_to_pypi(aesthetic=False) will automatically use the latest version - How do I get the latest version for github?
    • generate_localfiles
    • run_tests
    • commit
    • commit_and_push
    • if_publish_upload
    • sync_github_metadata

@Mandera
Copy link
Collaborator Author

Mandera commented Mar 23, 2023

Allow Files to have multiple targets

@Mandera
Copy link
Collaborator Author

Mandera commented Mar 23, 2023

Spreadsheet somewhere (generalpackager readme, collapsed?) with a row for every File and column for every Target

@Mandera
Copy link
Collaborator Author

Mandera commented Mar 26, 2023

I need to structure getting a list of packagers in workflow, currently have a few different calls:

  • self.packager.get_ordered_packagers(include_private=False, include_summary_packagers=True)
  • self.packager.get_ordered_packagers(include_private=True, include_summary_packagers=True)
  • self.packager.get_ordered_packagers(include_private=False, include_summary_packagers=False)
  • Packager.packagers_from_packages()

Created Packager.workflow_packagers to be used in workflow methods

@Mandera
Copy link
Collaborator Author

Mandera commented Mar 26, 2023

How are private ones going to be able to get published? Could they just get added to the workflow?

  • Packager.get_ordered_packagers(include_private=True) isn't even getting any private packagers because there aren't any private ones connected

@Mandera
Copy link
Collaborator Author

Mandera commented Mar 26, 2023

Getting packagers isn't very well structured, there are:

  • packagers_from_packages
    • Returns all Packagers that are defined in that coupled file
    • No parameter for target or private
  • get_ordered_packagers
    • Returns python packages connected through spawn_parents with get_dependencies
    • Optionally adds summary_packagers
    • Can filter for private (Never gets them though)

Perhaps not worth fixing until #70 is done

@Mandera
Copy link
Collaborator Author

Mandera commented Mar 26, 2023

Packager()._get_files_as_tsv()

name generatable aesthetic remove overwrite is_file python node django exe summary path
CommitEditmsgFile               .git/COMMIT_EDITMSG
ExamplesFile                 examples
ExeproductFile                   dist/exetarget
ExetargetFile                 exetarget.py
GenerateFile           generate.py
GitExcludeFile   .git/info/exclude
IndexJsFile             index.js
InitFile               generalpackager/init.py
LicenseFile   LICENSE
ManifestFile             MANIFEST.in
MetadataFile                 metadata.json
NpmIgnoreFile           .npmignore
OrgReadmeFile           README.md
PackageJsonFile             package.json
PreCommitHookFile             .git/hooks/pre-commit
PrePushHookFile     .git/hooks/pre-push
ReadmeFile     README.md
SetupFile             setup.py
TestFile                   generalpackager/test
TestJsFile               test.js
TestTemplateFile             generalpackager/test/test_generalpackager.py
WorkflowFile       .github/workflows/workflow.yml

Mandera added a commit that referenced this issue Mar 26, 2023
Mandera added a commit that referenced this issue Mar 26, 2023
Mandera added a commit that referenced this issue Mar 26, 2023
Next up is checking every ordered method call

Signed-off-by: Mandera <[email protected]>
@Mandera
Copy link
Collaborator Author

Mandera commented Mar 27, 2023

[ ] if_publish_bump

  • Is using compare_local_to_pypi, should change to github's and implement github.download(version)
  • self.compare_local_to_pypi(aesthetic=False) will automatically use the latest version - How do I get the latest version for github?

Working on this. Thought I would create get_all_versions for packager host protocol but now I realized that "git", "tag", "-l", "--sort=-v:refname" is a local git command, more suited for localrepo. So making that into a general method seems tough

If I want to keep that method I could use "https://api.github.com/repos///tags" for github

Mandera added a commit that referenced this issue Mar 28, 2023
Mandera added a commit that referenced this issue Apr 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: 🟡 In Progress
Development

No branches or pull requests

1 participant