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

fix codestyle test #26

Merged
merged 2 commits into from
Aug 3, 2022
Merged

fix codestyle test #26

merged 2 commits into from
Aug 3, 2022

Conversation

KanaiYuma-aist
Copy link
Collaborator

Fix for Pycodestyle Test and Flack8 Test

  • For Pycodestyle Test
    • Add white space
  • For Flack8 Test
    • Specify 'flake8' version as 4.0.1 (Update to flake8 occurred on 8/1 and the class 'ConfigFileFinder' became unusable)

@github-actions
Copy link

github-actions bot commented Aug 2, 2022

Unit Test Results

238 tests  ±0   238 ✔️ ±0   35s ⏱️ -4s
    1 suites ±0       0 💤 ±0 
    1 files   ±0       0 ±0 

Results for commit ce0fda5. ± Comparison against base commit 5b8b113.

@KanaiYuma-aist
Copy link
Collaborator Author

KanaiYuma-aist commented Aug 2, 2022

@yoshipon @tkokada @aramoto99

As a background to the creation of this pull requesut, an update of pycodestyle on 7/31 and Flack8 on 8/1 occurred, and the tests failed.

The pycodestyle modification was a minor modification to add spaces, and the test was successful, but the Flake8 modification was a moderate or larger modification, as the class ConfigFileFinder disappeared in the update, and I guessed that using the latest version would require a medium or larger modification.
Therefore, I modified it by once specifying the older version in the requirements.txt file.

Please let me know if you have any comments on this modification.


このpull requesutを作成した経緯としまして、
7/31にpycodestyleの、8/1にFlack8のアップデートが発生し、
テストが失敗するようになりました。

pycodestyleの改修は、スペースを入れる軽微な修正でテストが成功したのですが、
Flake8の改修は、アップデートでクラス ConfigFileFinder が消えており、
最新バージョンを使うと、中規模以上の改修が必要と推測されるため、
一旦requirements.txtで古いバージョンを指定する形で改修しました。

こちらの改修について何かご意見あればお聞かせ下さい。

@tkokada
Copy link
Collaborator

tkokada commented Aug 3, 2022

Just my opinion, I didn't check any changes about ConfigFileFinder.

In general terms, the rollback to reffer old libraries, is not good.
But reducing the codes, is good.

@yoshipon yoshipon self-requested a review August 3, 2022 02:20
Copy link
Collaborator

@yoshipon yoshipon left a comment

Choose a reason for hiding this comment

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

I agree with Okada san.

What is the problem?
aiaccel seems not to depend on ConfigFileFinder, right?

@aramoto99
Copy link
Collaborator

This problem is occurring with pytest-flake8.
tholo/pytest-flake8#87

This error occurs when flake8==5.0.1.
I think it is better to keep using 4.0.1 for the time being.

@tkokada
Copy link
Collaborator

tkokada commented Aug 3, 2022

Thank you for sharing the link.

The bug about flake8_5.0.1 will be fixed in future but currently it's better to use 4.0.1, isn't it?

@yoshipon
Copy link
Collaborator

yoshipon commented Aug 3, 2022

I see, thank you!
is 5.0.0 not good?

@KanaiYuma-aist
Copy link
Collaborator Author

Because an error occurs when using flake8 5.01, modified to continue to use 4.01, which has been working stably.

I also tried flake8 5.00 and got the same error.

(What is "Changes requested"?)

@yoshipon
Copy link
Collaborator

yoshipon commented Aug 3, 2022

I see. So, I think we don't have to change anything in this PR, but could you open an Issue to use the latest flake8 after the bug is fixed?
We will forget this issue in a few weeks...

@KanaiYuma-aist
Copy link
Collaborator Author

KanaiYuma-aist commented Aug 3, 2022

In that case(don't change anything), until the flake8 error is fixed, the test will fail and other merge will not be possible, is this correct?

@yoshipon
Copy link
Collaborator

yoshipon commented Aug 3, 2022

No, this PR will be merged after you create the issue (as a reminder).

@KanaiYuma-aist
Copy link
Collaborator Author

I see, I was mistaken.

I created the issues.
#27

@yoshipon
Copy link
Collaborator

yoshipon commented Aug 3, 2022

Thank you!

@yoshipon yoshipon merged commit da21de6 into main Aug 3, 2022
@KanaiYuma-aist KanaiYuma-aist deleted the feature/fix_pycodestyle branch August 3, 2022 08:36
yoshipon added a commit that referenced this pull request Aug 5, 2022
* Fix #19 (#20)

* Fix #21 (#22)

* fix README (#23)

* fix codestyle test (#26)

* fix for pycodestyle

* add flake8==4.0.1

* Feature/update readme (#25)

* update README

* add bash

Co-authored-by: Yoshiaki Bando <yoshipon@users.noreply.github.com>

* Fix resumption test for DB

Co-authored-by: Takashi OKADA <tk.okada.github@gmail.com>
Co-authored-by: KanaiYuma-aist <105629713+KanaiYuma-aist@users.noreply.github.com>
Co-authored-by: Yoshiaki Bando <yoshipon@users.noreply.github.com>
yoshipon added a commit that referenced this pull request Aug 26, 2022
* Fix #19 (#20)

* Fix #21 (#22)

* fix README (#23)

* fix codestyle test (#26)

* fix for pycodestyle

* add flake8==4.0.1

* Feature/update readme (#25)

* update README

* add bash

Co-authored-by: Yoshiaki Bando <yoshipon@users.noreply.github.com>

* Fix TPE resumtion test (#29)

* Fix tpe resumption test

* fix tpe resumption test

* Fix tep resumption test

* add retry (#38)

* Add dynamic loading of optimizer (#34)

* (WIP) Add dynamic loading of optimizer by importlib.

* (WIP) Add dynamic loading of optimizer by importlib.

* Add dynamic loading of optimizer by importlib

* Add dynamic loading of optimizer by importlib

* Fix test code

* fix test

* Fix resumtioin test

* Add dynamic loading of optimizer

* Fix dynamic loading of optimizer

* Function names and comments were rolled back.

* Changed the standard optimizer specification method

* changed the specification method for importing the standard optimizer.

* change deserialize (#40)

Co-authored-by: aramoto99 <aramoto-masahiro@aist.go.jp>

* Merge branch 'main' of github:aistairc/aiaccel into feature/database

* Fix codestyle

* (WIP) Change TPE resume

* Fix resume test

* Feature/fix resume tpe (#41)

* fix resume tpe

* fix resume tpe

* add if len(running_trials) > 0

* fix about trial number

* Fix TPE resumption

Co-authored-by: Takashi OKADA <tk.okada.github@gmail.com>
Co-authored-by: KanaiYuma-aist <105629713+KanaiYuma-aist@users.noreply.github.com>
Co-authored-by: Yoshiaki Bando <yoshipon@users.noreply.github.com>
yoshipon added a commit that referenced this pull request Aug 26, 2022
* Fix #19 (#20)

* Fix #21 (#22)

* fix README (#23)

* fix codestyle test (#26)

* fix for pycodestyle

* add flake8==4.0.1

* Feature/update readme (#25)

* update README

* add bash

Co-authored-by: Yoshiaki Bando <yoshipon@users.noreply.github.com>

* Fix TPE resumtion test (#29)

* Fix tpe resumption test

* fix tpe resumption test

* Fix tep resumption test

* add retry (#38)

* Add dynamic loading of optimizer (#34)

* (WIP) Add dynamic loading of optimizer by importlib.

* (WIP) Add dynamic loading of optimizer by importlib.

* Add dynamic loading of optimizer by importlib

* Add dynamic loading of optimizer by importlib

* Fix test code

* fix test

* Fix resumtioin test

* Add dynamic loading of optimizer

* Fix dynamic loading of optimizer

* Function names and comments were rolled back.

* Changed the standard optimizer specification method

* changed the specification method for importing the standard optimizer.

* change deserialize (#40)

Co-authored-by: aramoto99 <aramoto-masahiro@aist.go.jp>

* Merge branch 'main' of github:aistairc/aiaccel into feature/database

* Fix codestyle

* (WIP) Change TPE resume

* Fix resume test

* Feature/fix resume tpe (#41)

* fix resume tpe

* fix resume tpe

* add if len(running_trials) > 0

* fix about trial number

* Fix TPE resumption

Co-authored-by: Takashi OKADA <tk.okada.github@gmail.com>
Co-authored-by: KanaiYuma-aist <105629713+KanaiYuma-aist@users.noreply.github.com>
Co-authored-by: Yoshiaki Bando <yoshipon@users.noreply.github.com>
yoshipon added a commit that referenced this pull request Aug 30, 2022
* Data management function by database is added.
By adding the `--fs` option argument to the startup command, data management functions by the conventional file system can be used.
Extensive refactoring was performed around the addition of this functionality.

* Update setup.py

* Delete tests/test_data/work/state/ as it is not used in develop/database.

* Develop/database fix test (#18)

* fix for tests

* delete space

* pInfoDict -> p_info

* Merge main into debelop/database (#31)

* Fix #19 (#20)

* Fix #21 (#22)

* fix README (#23)

* fix codestyle test (#26)

* fix for pycodestyle

* add flake8==4.0.1

* Feature/update readme (#25)

* update README

* add bash

Co-authored-by: Yoshiaki Bando <yoshipon@users.noreply.github.com>

* Fix resumption test for DB

Co-authored-by: Takashi OKADA <tk.okada.github@gmail.com>
Co-authored-by: KanaiYuma-aist <105629713+KanaiYuma-aist@users.noreply.github.com>
Co-authored-by: Yoshiaki Bando <yoshipon@users.noreply.github.com>

* Feature/database (#36)

* Fix #19 (#20)

* Fix #21 (#22)

* fix README (#23)

* Fixed a problem in which Snapshot could not be saved during parallel execution.

* Add function of delete any data in DB/FS.

* Fix code style

Co-authored-by: Takashi OKADA <tk.okada.github@gmail.com>
Co-authored-by: KanaiYuma-aist <105629713+KanaiYuma-aist@users.noreply.github.com>

* Request to merge cumulative changes . (#37)

* Fix #19 (#20)

* Fix #21 (#22)

* fix README (#23)

* The report generation function can now be called by command.

* Fix data inconsistency when excute resume. (#39)

* Fix resume

* Fixed problem with sirialize not working in fs mode

* Remove unused package imports

* Fixed a problem that the resume function did not work in fs mode.

* The name workspace/state is the name of the old specification, so it was changed to the appropriate name workspace/snapshot.

* Delete unnecessary directories in Workspace.

* Delete unnecessary directories in Workspace.

* Delete unnecessary directories in Workspace.

* Delete unnecessary directories in Workspace.

Co-authored-by: Takashi OKADA <tk.okada.github@gmail.com>
Co-authored-by: KanaiYuma-aist <105629713+KanaiYuma-aist@users.noreply.github.com>

* Add dynamic loading of optimizer, And fix resumtion test. (#42)

* Fix #19 (#20)

* Fix #21 (#22)

* fix README (#23)

* fix codestyle test (#26)

* fix for pycodestyle

* add flake8==4.0.1

* Feature/update readme (#25)

* update README

* add bash

Co-authored-by: Yoshiaki Bando <yoshipon@users.noreply.github.com>

* Fix TPE resumtion test (#29)

* Fix tpe resumption test

* fix tpe resumption test

* Fix tep resumption test

* add retry (#38)

* Add dynamic loading of optimizer (#34)

* (WIP) Add dynamic loading of optimizer by importlib.

* (WIP) Add dynamic loading of optimizer by importlib.

* Add dynamic loading of optimizer by importlib

* Add dynamic loading of optimizer by importlib

* Fix test code

* fix test

* Fix resumtioin test

* Add dynamic loading of optimizer

* Fix dynamic loading of optimizer

* Function names and comments were rolled back.

* Changed the standard optimizer specification method

* changed the specification method for importing the standard optimizer.

* change deserialize (#40)

Co-authored-by: aramoto99 <aramoto-masahiro@aist.go.jp>

* Merge branch 'main' of github:aistairc/aiaccel into feature/database

* Fix codestyle

* (WIP) Change TPE resume

* Fix resume test

* Feature/fix resume tpe (#41)

* fix resume tpe

* fix resume tpe

* add if len(running_trials) > 0

* fix about trial number

* Fix TPE resumption

Co-authored-by: Takashi OKADA <tk.okada.github@gmail.com>
Co-authored-by: KanaiYuma-aist <105629713+KanaiYuma-aist@users.noreply.github.com>
Co-authored-by: Yoshiaki Bando <yoshipon@users.noreply.github.com>

* Fix conflicts with main branch (#43)

* Fix #19 (#20)

* Fix #21 (#22)

* fix README (#23)

* fix codestyle test (#26)

* fix for pycodestyle

* add flake8==4.0.1

* Feature/update readme (#25)

* update README

* add bash

Co-authored-by: Yoshiaki Bando <yoshipon@users.noreply.github.com>

* Fix TPE resumtion test (#29)

* Fix tpe resumption test

* fix tpe resumption test

* Fix tep resumption test

* add retry (#38)

* Add dynamic loading of optimizer (#34)

* (WIP) Add dynamic loading of optimizer by importlib.

* (WIP) Add dynamic loading of optimizer by importlib.

* Add dynamic loading of optimizer by importlib

* Add dynamic loading of optimizer by importlib

* Fix test code

* fix test

* Fix resumtioin test

* Add dynamic loading of optimizer

* Fix dynamic loading of optimizer

* Function names and comments were rolled back.

* Changed the standard optimizer specification method

* changed the specification method for importing the standard optimizer.

* change deserialize (#40)

Co-authored-by: aramoto99 <aramoto-masahiro@aist.go.jp>

* Merge branch 'main' of github:aistairc/aiaccel into feature/database

* Fix codestyle

* (WIP) Change TPE resume

* Fix resume test

* Feature/fix resume tpe (#41)

* fix resume tpe

* fix resume tpe

* add if len(running_trials) > 0

* fix about trial number

* Fix TPE resumption

Co-authored-by: Takashi OKADA <tk.okada.github@gmail.com>
Co-authored-by: KanaiYuma-aist <105629713+KanaiYuma-aist@users.noreply.github.com>
Co-authored-by: Yoshiaki Bando <yoshipon@users.noreply.github.com>

* Fix codestyle

Co-authored-by: KanaiYuma-aist <105629713+KanaiYuma-aist@users.noreply.github.com>
Co-authored-by: Takashi OKADA <tk.okada.github@gmail.com>
Co-authored-by: Yoshiaki Bando <yoshipon@users.noreply.github.com>
aramoto99 added a commit that referenced this pull request Aug 30, 2022
* Data management function by database is added.
By adding the `--fs` option argument to the startup command, data management functions by the conventional file system can be used.
Extensive refactoring was performed around the addition of this functionality.

* Update setup.py

* Delete tests/test_data/work/state/ as it is not used in develop/database.

* Develop/database fix test (#18)

* fix for tests

* delete space

* pInfoDict -> p_info

* Merge main into debelop/database (#31)

* Fix #19 (#20)

* Fix #21 (#22)

* fix README (#23)

* fix codestyle test (#26)

* fix for pycodestyle

* add flake8==4.0.1

* Feature/update readme (#25)

* update README

* add bash

Co-authored-by: Yoshiaki Bando <yoshipon@users.noreply.github.com>

* Fix resumption test for DB

Co-authored-by: Takashi OKADA <tk.okada.github@gmail.com>
Co-authored-by: KanaiYuma-aist <105629713+KanaiYuma-aist@users.noreply.github.com>
Co-authored-by: Yoshiaki Bando <yoshipon@users.noreply.github.com>

* Feature/database (#36)

* Fix #19 (#20)

* Fix #21 (#22)

* fix README (#23)

* Fixed a problem in which Snapshot could not be saved during parallel execution.

* Add function of delete any data in DB/FS.

* Fix code style

Co-authored-by: Takashi OKADA <tk.okada.github@gmail.com>
Co-authored-by: KanaiYuma-aist <105629713+KanaiYuma-aist@users.noreply.github.com>

* Request to merge cumulative changes . (#37)

* Fix #19 (#20)

* Fix #21 (#22)

* fix README (#23)

* The report generation function can now be called by command.

* Fix data inconsistency when excute resume. (#39)

* Fix resume

* Fixed problem with sirialize not working in fs mode

* Remove unused package imports

* Fixed a problem that the resume function did not work in fs mode.

* The name workspace/state is the name of the old specification, so it was changed to the appropriate name workspace/snapshot.

* Delete unnecessary directories in Workspace.

* Delete unnecessary directories in Workspace.

* Delete unnecessary directories in Workspace.

* Delete unnecessary directories in Workspace.

Co-authored-by: Takashi OKADA <tk.okada.github@gmail.com>
Co-authored-by: KanaiYuma-aist <105629713+KanaiYuma-aist@users.noreply.github.com>

* Add dynamic loading of optimizer, And fix resumtion test. (#42)

* Fix #19 (#20)

* Fix #21 (#22)

* fix README (#23)

* fix codestyle test (#26)

* fix for pycodestyle

* add flake8==4.0.1

* Feature/update readme (#25)

* update README

* add bash

Co-authored-by: Yoshiaki Bando <yoshipon@users.noreply.github.com>

* Fix TPE resumtion test (#29)

* Fix tpe resumption test

* fix tpe resumption test

* Fix tep resumption test

* add retry (#38)

* Add dynamic loading of optimizer (#34)

* (WIP) Add dynamic loading of optimizer by importlib.

* (WIP) Add dynamic loading of optimizer by importlib.

* Add dynamic loading of optimizer by importlib

* Add dynamic loading of optimizer by importlib

* Fix test code

* fix test

* Fix resumtioin test

* Add dynamic loading of optimizer

* Fix dynamic loading of optimizer

* Function names and comments were rolled back.

* Changed the standard optimizer specification method

* changed the specification method for importing the standard optimizer.

* change deserialize (#40)

Co-authored-by: aramoto99 <aramoto-masahiro@aist.go.jp>

* Merge branch 'main' of github:aistairc/aiaccel into feature/database

* Fix codestyle

* (WIP) Change TPE resume

* Fix resume test

* Feature/fix resume tpe (#41)

* fix resume tpe

* fix resume tpe

* add if len(running_trials) > 0

* fix about trial number

* Fix TPE resumption

Co-authored-by: Takashi OKADA <tk.okada.github@gmail.com>
Co-authored-by: KanaiYuma-aist <105629713+KanaiYuma-aist@users.noreply.github.com>
Co-authored-by: Yoshiaki Bando <yoshipon@users.noreply.github.com>

* Fix conflicts with main branch (#43)

* Fix #19 (#20)

* Fix #21 (#22)

* fix README (#23)

* fix codestyle test (#26)

* fix for pycodestyle

* add flake8==4.0.1

* Feature/update readme (#25)

* update README

* add bash

Co-authored-by: Yoshiaki Bando <yoshipon@users.noreply.github.com>

* Fix TPE resumtion test (#29)

* Fix tpe resumption test

* fix tpe resumption test

* Fix tep resumption test

* add retry (#38)

* Add dynamic loading of optimizer (#34)

* (WIP) Add dynamic loading of optimizer by importlib.

* (WIP) Add dynamic loading of optimizer by importlib.

* Add dynamic loading of optimizer by importlib

* Add dynamic loading of optimizer by importlib

* Fix test code

* fix test

* Fix resumtioin test

* Add dynamic loading of optimizer

* Fix dynamic loading of optimizer

* Function names and comments were rolled back.

* Changed the standard optimizer specification method

* changed the specification method for importing the standard optimizer.

* change deserialize (#40)

Co-authored-by: aramoto99 <aramoto-masahiro@aist.go.jp>

* Merge branch 'main' of github:aistairc/aiaccel into feature/database

* Fix codestyle

* (WIP) Change TPE resume

* Fix resume test

* Feature/fix resume tpe (#41)

* fix resume tpe

* fix resume tpe

* add if len(running_trials) > 0

* fix about trial number

* Fix TPE resumption

Co-authored-by: Takashi OKADA <tk.okada.github@gmail.com>
Co-authored-by: KanaiYuma-aist <105629713+KanaiYuma-aist@users.noreply.github.com>
Co-authored-by: Yoshiaki Bando <yoshipon@users.noreply.github.com>

* change serialize timing

Co-authored-by: aramoto99 <aramoto-masahiro@aist.go.jp>
Co-authored-by: aramoto99 <107896581+aramoto99@users.noreply.github.com>
Co-authored-by: Takashi OKADA <tk.okada.github@gmail.com>
Co-authored-by: Yoshiaki Bando <yoshipon@users.noreply.github.com>
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.

4 participants