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

Travis CI migration and packaging improvements #2990

Merged
merged 13 commits into from
May 17, 2018

Conversation

webknjaz
Copy link
Member

What do these changes do?

  • port Travis CI config changes from multidict
  • CI config polishing
  • CI links update
  • port dist setup changes
  • other packaging and CI related stuff
  • all changes are put into atomic commits making it possible to rebase-merge that as is

Are there changes in behavior for the user?

Related issue number

Checklist

  • I think the code is well written
  • Unit tests for the changes exist
  • Documentation reflects the changes
  • If you provide code modification, please add yourself to CONTRIBUTORS.txt
    • The format is <Name> <Surname>.
    • Please keep alphabetical order, the file is sorted by names.
  • Add a new news fragment into the CHANGES folder
    • name it <issue_id>.<type> for example (588.bugfix)
    • if you don't have an issue_id change it to the pr id after creating the pr
    • ensure type is one of the following:
      • .feature: Signifying a new feature.
      • .bugfix: Signifying a bug fix.
      • .doc: Signifying a documentation improvement.
      • .removal: Signifying a deprecation or removal of public API.
      • .misc: A ticket has been closed, but it is not of interest to users.
    • Make sure to use full sentences with correct case and punctuation, for example: "Fix issue with non-ascii contents in doctest text files."

@webknjaz webknjaz requested a review from asvetlov May 10, 2018 23:02
setup.py Outdated
'CI: Shippable': 'https://app.shippable.com/github/{}'.format(repo_slug),
'CI: Travis': 'https://travis-ci.com/{}'.format(repo_slug),
'Coverage: codecov': 'https://codecov.io/github/{}'.format(repo_slug),
'Docs: RTD': 'https://{}.readthedocs.io'.format(name),
Copy link
Member

Choose a reason for hiding this comment

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

It is http://docs.aiohttp.org

Copy link
Member Author

Choose a reason for hiding this comment

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

*https

setup.py Outdated

name = 'aiohttp'
Copy link
Member

Choose a reason for hiding this comment

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

I don't like name substitution.
A plain constant is more obvious than string-formatted, isn't it?

Copy link
Member Author

Choose a reason for hiding this comment

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

I don't want to create code diversity, which often leads to forgetting to update some of places. Also, I use this approach in lots other distributions including multidict, which proved to be useful.

Copy link
Member

Choose a reason for hiding this comment

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

I've approved it for multidict but now I'm inclining to revert bare strings back.
It is written once but read many times.
Every time when I see the line I should remember what name is.
You've convinced me that we need overcomplicated travis config. Perhaps it is true, I'm not Travis expert.
But for setup.py I pretty sure that the simplest approach is the best.

Copy link
Member Author

Choose a reason for hiding this comment

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

I'd agree if we were using declarative setup.cfg, but this is code here.

Copy link
Member Author

Choose a reason for hiding this comment

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

By the way I have an 80-line shim snippet for supporting newer setuptools, which would allow us to move a vast of meta/options to setup.cfg

Copy link
Member Author

Choose a reason for hiding this comment

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

Here's how it would've looked in ansible if we accepted the patch: https://github.com/ansible/ansible/pull/38413/files#diff-380c6a8ebbbce17d55d50ef17d3cf906R1

Copy link
Member

Choose a reason for hiding this comment

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

+1 to move all to setup.cfg

Copy link
Member

@kxepal kxepal May 15, 2018

Choose a reason for hiding this comment

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

Copy link
Member Author

Choose a reason for hiding this comment

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

I know how to do it, it's just not going to be in the same PR.

Copy link
Member Author

Choose a reason for hiding this comment

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

Also, there's certain complications related to this change. So let's not rush.

setup.py Outdated

name = 'aiohttp'
appveyor_slug = 'asvetlov/{}'.format(name) # FIXME: move under aio-libs/* slug
Copy link
Member Author

Choose a reason for hiding this comment

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

@asvetlov how about finally fixing AppVeyor URL?

Copy link
Member

Choose a reason for hiding this comment

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

I don't remember how to setup it.
Could you do it yourself?

Copy link
Member Author

Choose a reason for hiding this comment

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

This requires owner privileges AFAIR, so I can't. It's a bit tricky, but the bottom line is that you create a team there mapped to the team in GitHub and give it some access there. Also you need to somehow create an org link there.

Copy link
Member Author

Choose a reason for hiding this comment

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

Here you go: https://www.appveyor.com/docs/team-setup/#setting-up-appveyor-account-for-github-organization
Create a separate account called aio-libs and then add your personal account as its administrator. You can also create team mapped to some team in GitHub, allowing its members to cancel/rerun builds.

@webknjaz webknjaz force-pushed the feature/travis-ci-migration-and-packaging branch 4 times, most recently from 5710686 to 2c9c521 Compare May 14, 2018 06:58
@webknjaz webknjaz force-pushed the feature/travis-ci-migration-and-packaging branch from 2c9c521 to 9396516 Compare May 14, 2018 07:12
@webknjaz
Copy link
Member Author

@asvetlov please remove this deprecated integration continuous-integration/travis-ci/push Pending — The Travis CI build is in progress Required Details and make new Travis CI - Pull Request In progress — Build Started required instead.

@asvetlov
Copy link
Member

@webknjaz I've added you to admin team.
I hope by this we can be more effective: instead asking me to press some buttons in github UI you can just do it yourself (but please discuss changes first :)

@asvetlov
Copy link
Member

Anyway updated travis integration by your request

@webknjaz
Copy link
Member Author

Sure, thanks :)

@webknjaz
Copy link
Member Author

I'm still seeing it @ https://github.com/aio-libs/aiohttp/settings/installations.
Will remove it myself.

@webknjaz
Copy link
Member Author

@asvetlov can we accept it now?

Copy link
Member

@asvetlov asvetlov left a comment

Choose a reason for hiding this comment

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

Almost good but I have a couple questions to discuss before merging

@@ -14,10 +14,10 @@ install:
build: false

test_script:
- "tools/build.cmd %PYTHON%\\python.exe setup.py test"
- "tools/build.cmd %PYTHON%\\python.exe -m pytest tests"
Copy link
Member

Choose a reason for hiding this comment

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

Why -m? Technically setup.py is not an importable module but just a script.
Did I miss something?

Copy link
Member Author

Choose a reason for hiding this comment

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

Running setup.py test is considered bad practice and it's broken in this CI for some reason. Thus we have to run pytest as it's designed to work.

Copy link
Member

Choose a reason for hiding this comment

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

Ok, I see

.appveyor.yml Outdated

after_test:
- "tools/build.cmd %PYTHON%\\python.exe setup.py sdist bdist_wheel"
- "tools/build.cmd %PYTHON%\\python.exe -m setup sdist bdist_wheel"
Copy link
Member

Choose a reason for hiding this comment

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

-m again

Copy link
Member Author

Choose a reason for hiding this comment

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

it just looks cleaner, but doesn't really change things. you can run any python script/module this way. it's not only for packages.

Copy link
Member

Choose a reason for hiding this comment

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

I know I can but it looks confusing. At least for me.

Copy link
Member Author

Choose a reason for hiding this comment

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

It might look confusing for someone who is not used to it. It works though, I'm using it all the time now.

.travis.yml Show resolved Hide resolved
.travis.yml Outdated Show resolved Hide resolved
@asvetlov asvetlov merged commit 1d3afb2 into master May 17, 2018
@asvetlov asvetlov deleted the feature/travis-ci-migration-and-packaging branch May 17, 2018 19:24
@lock
Copy link

lock bot commented Oct 28, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a [new issue] for related bugs.
If you feel like there's important points made in this discussion, please include those exceprts into that [new issue].
[new issue]: https://github.com/aio-libs/aiohttp/issues/new

@lock lock bot added the outdated label Oct 28, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Oct 28, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants